Chart Data Table
Contents
[
Hide
]
Set Font Properties for Chart Data Table
Aspose.Slides for PHP via Java provides support for changing color of categories in a series color.
- Instantiate Presentation class object.
- Add chart on the slide.
- set chart table.
- Set font height.
- Save modified presentation.
Below sample example is given.
# Creating empty presentation
$pres = new Presentation();
try {
$chart = $pres->getSlides()->get_Item(0)->getShapes()->addChart(ChartType::ClusteredColumn, 50, 50, 600, 400);
$chart->setDataTable(true);
$chart->getChartDataTable()->getTextFormat()->getPortionFormat()->setFontBold(NullableBool::True);
$chart->getChartDataTable()->getTextFormat()->getPortionFormat()->setFontHeight(20);
$pres->save("output.pptx", SaveFormat::Pptx);
} finally {
if (!java_is_null($pres)) {
$pres->dispose();
}
}