Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

axis titles in sample 5 doesn't work. #267

Closed
pgee70 opened this issue Sep 15, 2016 · 6 comments
Closed

axis titles in sample 5 doesn't work. #267

pgee70 opened this issue Sep 15, 2016 · 6 comments

Comments

@pgee70
Copy link
Contributor

pgee70 commented Sep 15, 2016

Sorry for so many issues, but if you don't know about them, you don't know.

in Sample_05_Chart_with_PHPExcel.php
line 69,70:
$shape->getPlotArea()->getAxisX()->setTitle('Month');
$shape->getPlotArea()->getAxisY()->setTitle('Downloads');

do not appear to be working:

image
setting the axis title in powerpoint reveals the default text of 'Axis Title'
I did some tracing and the values appear to save in the local object, they seem to be written with the $objWriter->writeElement('a:t', $oAxis->getTitle()); in PhpOffice\PhpPresentation\Writer\PowerPoint2007\PptCharts
but after that I don't know what happens...

@pgee70
Copy link
Contributor Author

pgee70 commented Sep 25, 2016

i think i have a fix for this one:
in Powerpoint2007:PptCharts::writeAxis around line 2079 there is a missing c:title element (outdented)

      // c:tickLblPos
        $objWriter->startElement('c:tickLblPos');
        $objWriter->writeAttribute('val', 'nextTo');
        $objWriter->endElement();

        // c:txPr
$objWriter->startElement('c:title');

        $objWriter->startElement('c:txPr');

// this needs to be closed around line 2148
// ## c:txPr

        $objWriter->endElement();

 $objWriter->endElement();   

@Progi1984
Copy link
Member

@pgee70 I just modified your fix. Could you test the PR #288 ?

@Progi1984 Progi1984 self-assigned this Oct 27, 2016
@Progi1984
Copy link
Member

@pgee70 Some feedback, please.

1 similar comment
@Progi1984
Copy link
Member

@pgee70 Some feedback, please.

@pgee70
Copy link
Contributor Author

pgee70 commented Dec 21, 2016

Hi. If the X and Y titles are now visible in Sample_05_Chart_with_PHPExcel then call it fixed!

Progi1984 added a commit to Progi1984/PHPPresentation that referenced this issue Jan 15, 2017
Progi1984 added a commit that referenced this issue Jan 15, 2017
#267 : Fixed the axis title in bar chart
@Progi1984
Copy link
Member

@pgee70 Fixed in develop branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants