Merge pull request #869 from vitalyrepin/1.8

Bug fix: c:max and c:min elements shall NOT be inside c:orientation elements
This commit is contained in:
Mark Baker 2016-03-31 22:33:59 +01:00
commit 1a237573f9

View File

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