Adjust the position of data labels of series starts to support in Spire.Presentation 2.1.3

We are glad to announce a new hotfix version of Spire.Presentation Pack 2.1.3 today. In this version, our Develop Team not only added a new feature to adjust the position of data labels of series but also fixed a bug in it. Please check the following code snippet for how to adjust the position of data labels of series.

Code Snippet:

Presentation presentation = new Presentation();
presentation.LoadFromFile("Test.pptx");
IChart chart = presentation.Slides[0].Shapes[0] as IChart;
Spire.Presentation.Collections.ChartSeriesFormatCollection sers = chart.Series;
sers[0].DataLabels.Position = ChartDataLabelPosition.Center;
ChartDataLabel cdl = sers[0].DataLabels.Add();
cdl.LabelValueVisible = true;
cdl.Position = ChartDataLabelPosition.OutsideEnd;
ChartDataLabel cd2 = sers[0].DataLabels.Add();
cd2.LabelValueVisible = true;
cd2.Position = ChartDataLabelPosition.InsideEnd;
presentation.SaveToFile("Result.pptx",FileFormat.Pptx2007);

Bug Solutions:

  • Fix the error "Object reference not set to an instance of an object." when change the text of series labels.

Free Trail to evaluate Spire.Presentation Pack 2.1.3 here:

http://www.e-iceblue.com/Download/download-presentation-for-net-now.html