Chart Data Table
Contents
[
Hide
]
Set Font Properties for Chart Data Table
Aspose.Slides for 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
Presentation pres = new Presentation();
try {
IChart 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 (pres != null) pres.dispose();
}