Bug fix: c:max and c:min elements must not be inside c:orientation elements. They shall be inside c:scaling elements. Otherwise they are ignored by Excel and Libreoffice

This commit is contained in:
Vitaly Repin 2016-03-24 00:45:27 +02:00
parent 7fa160905b
commit 44918984a1

View File

@ -540,8 +540,6 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
}
$objWriter->startElement('c:scaling');
$objWriter->startElement('c:orientation');
$objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('orientation'));
if (!is_null($xAxis->getAxisOptionsProperty('maximum'))) {
$objWriter->startElement('c:max');
@ -555,6 +553,10 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
$objWriter->endElement();
}
$objWriter->startElement('c:orientation');
$objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('orientation'));
$objWriter->endElement();
$objWriter->endElement();