I found 2 versions of this library on the Internet. One is from github and the other is codeplex.One on Github definitely looks newer, but it lacks documentation of any type. Codeplex is dated, but actually has code samples.
tl; dr - No (in my testing anyway), No and No.
Long version
Looking through the code and looking at the generated XML, I noticed several things:
- In Powerpoint 2013, the Y axis (value axis) is not displayed in the generated file, but saving the file after opening it led to the appearance of the Y axis. I see label marks in XML, but something is preventing me from displaying it.
Generated XML (charts / chart1.xml after unpacking the generated .pptx file):
<c:valAx> <c:axId val="52749440"/> <c:scaling> <c:orientation val="minMax"/> </c:scaling> <c:axPos val="l"/> <c:numFmt formatCode="" sourceLinked="0"/> <c:majorTickMark val="none"/> <c:tickLblPos val="nextTo"/> <c:txPr> <a:bodyPr/> <a:lstStyle/> <a:p> <a:pPr> <a:defRPr/> </a:pPr> <a:r> <a:rPr lang="en-US" dirty="0"/> <a:t>Y Axis!</a:t> </a:r> <a:endParaRPr lang="en-US" dirty="0"/> </a:p> </c:txPr> <c:crossAx val="52743552"/> <c:crosses val="autoZero"/> <c:crossBetween val="between"/> </c:valAx>
I am setting Axis labels by adding the following lines:
$shape->getPlotArea()->getAxisX()->setTitle('X Axis!'); $shape->getPlotArea()->getAxisY()->setTitle('Y Axis!');
after this line in the script:
$shape->getPlotArea()->setType($lineChart);
- Grid lines and line color seem possible, but there are no support methods in the current class.
The last available Powerpoint writer classes date back to 2007, which are pretty dated. You may need to update the XML structure and add some additional features. I will review some documents in OOXML format and see how easy it would be to add them without rewriting the writer classes from scratch.
source share