Skip to content
This repository has been archived by the owner on Jan 2, 2019. It is now read-only.

Commit

Permalink
Bug fix: c:max and c:min elements must not be inside c:orientation el…
Browse files Browse the repository at this point in the history
…ements. They shall be inside c:scaling elements. Otherwise they are ignored by Excel and Libreoffice
  • Loading branch information
vitalyrepin committed Mar 23, 2016
1 parent 7fa1609 commit 4491898
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Classes/PHPExcel/Writer/Excel2007/Chart.php
Expand Up @@ -540,8 +540,6 @@ private function writeValueAxis($objWriter, PHPExcel_Chart_PlotArea $plotArea, $
}

$objWriter->startElement('c:scaling');
$objWriter->startElement('c:orientation');
$objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('orientation'));

if (!is_null($xAxis->getAxisOptionsProperty('maximum'))) {
$objWriter->startElement('c:max');
Expand All @@ -555,6 +553,10 @@ private function writeValueAxis($objWriter, PHPExcel_Chart_PlotArea $plotArea, $
$objWriter->endElement();
}

$objWriter->startElement('c:orientation');
$objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('orientation'));


$objWriter->endElement();
$objWriter->endElement();

Expand Down

0 comments on commit 4491898

Please sign in to comment.