Chart Data Table
Set Font Properties for Chart Data Table
Aspose.Slides for .NET 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.
using (Presentation pres = new Presentation("test.pptx"))
{
IChart chart = pres.Slides[0].Shapes.AddChart(ChartType.ClusteredColumn, 50, 50, 600, 400);
chart.HasDataTable = true;
chart.ChartDataTable.TextFormat.PortionFormat.FontBold = NullableBool.True;
chart.ChartDataTable.TextFormat.PortionFormat.FontHeight = 20;
pres.Save("output.pptx", SaveFormat.Pptx);
}
FAQ
Can I show small legend keys next to the values in the chart’s data table?
Yes. The data table supports legend keys, and you can turn them on or off.
Will the data table be preserved when exporting the presentation to PDF, HTML, or images?
Yes. Aspose.Slides renders the chart as part of the slide, so the exported PDF/HTML/image includes the chart with its data table.
Are data tables supported for charts that come from a template file?
Yes. For any chart loaded from an existing presentation or template, you can check and change whether a data table is shown using the chart’s properties.
How can I quickly find which charts in a file have the data table enabled?
Inspect each chart’s property that indicates whether the data table is shown and iterate through the slides to identify the charts where it is enabled.