Chart Data Table
Contents
[
Hide
]
Set Font Properties for Chart Data Table
Aspose.Slides for C++ allows to change font properties for a chart data table.
- Instantiate Presentation class object.
- Add chart on the slide.
- Set chart table.
- Set font height.
- Save modified presentation.
Below sample example is given.
auto pres = System::MakeObject<Presentation>(u"test.pptx");
auto chart = pres->get_Slides()->idx_get(0)->get_Shapes()->AddChart(ChartType::ClusteredColumn, 50.0f, 50.0f, 600.0f, 400.0f);
chart->set_HasDataTable(true);
chart->get_ChartDataTable()->get_TextFormat()->get_PortionFormat()->set_FontBold(NullableBool::True);
chart->get_ChartDataTable()->get_TextFormat()->get_PortionFormat()->set_FontHeight(20.0f);
pres->Save(u"output.pptx", SaveFormat::Pptx);