This repository was archived by the owner on Jan 2, 2019. It is now read-only.
This repository was archived by the owner on Jan 2, 2019. It is now read-only.
Chart Y-Labels are centered #254
Open
Description
After examining the charts, I guess you have a typo there:
PHPExcel/Writer/Excel2007/Chart.php
[...]
if ($id1 > 0) {
$objWriter->startElement('c:crossAx');
$objWriter->writeAttribute('val', $id1);
- Line 624: $objWriter->writeAttribute('val', $id2);
+ Line 624: $objWriter->writeAttribute('val', $id1);
$objWriter->endElement();
$objWriter->startElement('c:crosses');
$objWriter->writeAttribute('val', "autoZero");
$objWriter->endElement();
$objWriter->startElement('c:crossBetween');
$objWriter->writeAttribute('val', "midCat");
$objWriter->endElement();
}
[...]
What happens is that Excel is cross-referencing the y-axix to the wrong and moving it to the center. No Idea why this happens only with negative numbers, but, hey, it solves the issue.
Great work by the way! Keep it up! :)