Skip to content
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
@tomw1808

Description

@tomw1808

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! :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions