-
Notifications
You must be signed in to change notification settings - Fork 526
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
Options for Charts #76
Comments
For labels hidden on the points, $series = new Series('Downloads', $seriesData);
$series->setShowValue(false); For the padding of the explosion of the pie3d, I add a option (cf. Sample_07.php l.135). For defining values as percent, $series = new Series('Downloads', $seriesData);
$series->setShowPercentage(true); |
Okay thank you very much, it works fine :) |
@chuebert Have you the last version of the develop branch ? |
Yes i have it now, but the $pie3DChart->setExplosion(10); doesnt change anything |
okay thank you ;) |
@chuebert After your tests, if it's ok for you, I will close this issue. Thanks for advance. |
@chuebert It's ok for you ? |
the explosion doesnt work, why? Here is my code: public function createChartSlide($slide, $tonalityData, $matchesData) {
/* CREATE TEXT */
$shape = $slide->createRichTextShape();
$shape->setHeight(200);
$shape->setWidth(640);
$shape->setOffsetX(20);
$shape->setOffsetY(100);
$shape->getActiveParagraph()->getAlignment()->setHorizontal(Alignment::HORIZONTAL_LEFT);
if ($this->user_id != 11 && $this->user_id != 17) {
$textRun = $shape->createTextRun('Zusammenfassung');
$textRun->getFont()->setBold(false);
$textRun->getFont()->setSize(28);
$textRun->getFont()->setColor(new Color($this->defaultTextColor));
}
/* Create a pie chart (that should be inserted in a shape) */
$pie3DChart = new Pie3D();
$pie3DChart->setExplosion(0);
$series = new Series('Downloads', $tonalityData);
$series->setShowPercentage(true);
$series->setShowSeriesName(false);
$series->getDataPointFill(0)->setFillType(Fill::FILL_SOLID)->setStartColor(new Color('FF4672A8'));
$series->getDataPointFill(1)->setFillType(Fill::FILL_SOLID)->setStartColor(new Color('FF8AA64F'));
$series->getDataPointFill(2)->setFillType(Fill::FILL_SOLID)->setStartColor(new Color('FFAB4744'));
$pie3DChart->addSeries($series);
/* Create a shape (chart) */
$shape = $slide->createChartShape();
$shape->setName('tonalität')
->setResizeProportional(false)
->setHeight(360)
->setWidth(500)
->setOffsetX(520)
->setOffsetY(300);
$shape->getTitle()->setText('Tonalität der Beiträge');
$shape->getTitle()->getFont()->setItalic(true);
$shape->getTitle()->getOffsetX(300);
$shape->getPlotArea()->setType($pie3DChart);
$shape->getView3D()->setRotationX(40);
$shape->getView3D()->setPerspective(10);
$shape->getLegend()->getBorder()->setLineStyle(Border::LINE_SINGLE);
$shape->getLegend()->getFont()->setItalic(true);
/* Create a line chart (that should be inserted in a shape) */
$lineChart = new Line();
$series = new Series('', $matchesData);
$series->setShowValue(false);
$series->setShowSeriesName(true);
$lineChart->addSeries($series);
/* Create a shape (chart) */
$shape = $slide->createChartShape();
$shape->setName('Trefferhäufigkeit')
->setResizeProportional(false)
->setHeight(360)
->setWidth(460)
->setOffsetX(40)
->setOffsetY(300);
$shape->getTitle()->setText('Trefferhäufigkeit der Beiträge');
$shape->getTitle()->getFont()->setItalic(true);
$shape->getPlotArea()->setType($lineChart);
$shape->getView3D()->setRotationX(30);
$shape->getView3D()->setPerspective(30);
$shape->getLegend()->getBorder()->setLineStyle(Border::LINE_SINGLE);
$shape->getLegend()->getFont()->setItalic(true);
} |
How can i remove the legend on line chart? ;) |
$shape->getLegend()->setVisible(false); |
[DELETE] |
@chuebert I think you have sent me a PHPPowerPoint generated file. I need an Office PowerPoint generated file for having the right XML and find the difference with PHPPowerPoint. |
ah okay ;) |
[DELETE] |
I have update my phppowerpoint folder again and now it works ;) |
For the lineChart with values, you must define the format because there are values : $shape->getPlotArea()->getAxisY()->setFormatCode('#,##0'); |
Thank you very much, its working fine :) Happy New Year ;) |
Thanks :) |
@manikrds At the moment, no. You can have line charts but without arrow and top legend. |
@Progi1984 Thanks for your comment |
@Progi1984 Sorry for the same question. Is Possible to have graph chart like this ?? |
@manikrds At the moment, no. You can have line charts but without filling zone under. If you want implementation, create an issue for each feature which miss you in PHPPowerPoint. |
Hi,
it is possible to have charts like this:
![https://dl.dropboxusercontent.com/u/6242507/charts.png](https://camo.githubusercontent.com/2c9d24cd313b627c997ffdbd9405d3bcde9feecca9a5dcc851b0442c950c0054/68747470733a2f2f646c2e64726f70626f7875736572636f6e74656e742e636f6d2f752f363234323530372f6368617274732e706e67)
In the left chart i want have the values on the left line and not by the points.
In the secon chart i want no paddings in the cake.
and it is possible to use percent by countet value or must i calculate it by my self?
The text was updated successfully, but these errors were encountered: