I have a web page with a chart (FusionChart) that I'm trying to download as a PowerPoint slide with a chart -- one that PowerPoint recognizes as a chart so it will allow the user to edit chart properties (ie: no image).
To this end, I downloaded PHPPowerPoint. After multiple distributions, include path hell, and much wailing and gnashing of teeth, I finally got the thing to work. Kind of. It produces the following:
As you can see, the chart is misplaced and it's empty. Here's the chart zoomed, so you can see it more clearly:
Given all the things wrong with this library and its complete lack of documentation, I'm inclined to think it's broken. However, people appear to be using this, so it's safer to assume I did something wrong.
A code snippet is below. Am I doing anything wrong? Alternatively, are there any free alternatives to PHPPowerPoint? All I care is about exporting a chart, so very limited functionality (Bar, Column & Pie graphs with a title) is all I need.
$objPHPPowerPoint = new PHPPowerPoint();
$objPHPPowerPoint->removeSlideByIndex(0);
$currentSlide = $objPHPPowerPoint->createSlide();
$series = new PHPPowerPoint_Shape_Chart_Series('', array(
'A' => 69,
'B' => 5,
'C' => 5,
'D' => 3,
'E' => 2
));
$series->setShowSeriesName(true);
$bar3DChart = new PHPPowerPoint_Shape_Chart_Type_Bar3D();
$bar3DChart->addSeries($series);
$shape = $currentSlide->createChartShape();
$shape->setResizeProportional(false);
$shape->setOffsetX(0);
$shape->setOffsetY(0);
$shape->setHeight(550);
$shape->setWidth(800);
$shape->getTitle()->setText($matrix[0][$graphCol]);
$shape->getPlotArea()->setType($bar3DChart);
$objWriter = PHPPowerPoint_IOFactory::createWriter($objPHPPowerPoint,'PowerPoint2007');
$objWriter->save('php://output');
Thanks in advance.