When adding a clone chart to presentation, the data labels number format is not applied.
Aspose.Slides.NET - version 22.7.0
private void btnChartDataLabelsNumFormatTest_Click(object sender, EventArgs e)
{
int defaultWorksheetIndex = 0;
Presentation presentation = new Presentation();
ISlide sld = presentation.Slides[0];
//clone chart
Presentation srcPres = new Presentation(@".\Templates\ShapeMaster.pptx");
IShape _tmpMstrChart = srcPres.Slides[0].Shapes[0];
IShape cloneShape = sld.Shapes.AddClone(_tmpMstrChart, 50, 50, 500, 300);
IChart chart = (Chart)cloneShape;
IChartDataWorkbook wb = chart.ChartData.ChartDataWorkbook;
//clear sample data in workbook
//chart.ChartData.ChartDataWorkbook.Clear(defaultWorksheetIndex);
//chart.ChartData.Categories.Clear();
IChartSeries series;
series = chart.ChartData.Series.First(x => x.Name.ToString() == "Series1");
series.DataPoints.Clear();
series.DataPoints.AddDataPointForBarSeries(wb.GetCell(defaultWorksheetIndex, 1, 1, float.Parse("0.0714")));
series.DataPoints.AddDataPointForBarSeries(wb.GetCell(defaultWorksheetIndex, 2, 1, null));
series.DataPoints.AddDataPointForBarSeries(wb.GetCell(defaultWorksheetIndex, 3, 1, float.Parse("0.5")));
series = chart.ChartData.Series.First(x => x.Name.ToString() == "Series2");
series.DataPoints.Clear();
series.DataPoints.AddDataPointForBarSeries(wb.GetCell(defaultWorksheetIndex, 1, 2, float.Parse("0.0514")));
series.DataPoints.AddDataPointForBarSeries(wb.GetCell(defaultWorksheetIndex, 2, 2, null));
series.DataPoints.AddDataPointForBarSeries(wb.GetCell(defaultWorksheetIndex, 3, 2, float.Parse("0.0614")));
presentation.Save(@"C:\\Temp\\Chart_DataLabels_NumFormat_Test.pptx", Aspose.Slides.Export.SaveFormat.Pptx);
}