Hi,
Thanks for your inquiry.
Please refer to the code below to set the font size for data labels in PowerPoint file.
- Code: Select all
Presentation ppt = new Presentation();
ppt.LoadFromFile("Test.pptx");
//Get the first chart
IChart chart = ppt.Slides[0].Shapes[0] as IChart;
//Get the data label of the first chart series.
ChartDataLabelCollection dataLabels = chart.Series[0].DataLabels;
//Set the font size for data label.
dataLabels.TextProperties.Paragraphs[0].DefaultCharacterProperties.FontHeight = 20;
//Save to file
ppt.SaveToFile("Result.pptx", Spire.Presentation.FileFormat.Pptx2013);
If there is any question, please offer us the following information for further investigation.
1. Your input PowerPoint file.
2. Your desired result file.
You could upload them here or send us(
[email protected]) via email.
Best wishes,
Amber
E-iceblue support team