Chart.Calculate not populating all point.DataLabels.Text with UpdateAllPoints = true

We recently upgraded from Aspose 23.7 to 24.8. To get the Text of DataLabels on chart series points, we updated chart.Calculate() to chart.Calculate(new ChartCalculateOptions() { UpdateAllPoints = true }). But this is not working to get the data label text for all data points.

Specifically, the DataLabels.Text field for the 3rd data series in the first chart in the attached document is not being populated.
TimChartORama-source.zip (16.0 KB)

Code to reproduce:
Using Aspose 24.8 or 24.9:

using var workbook = new Workbook([path to unzipped file]);
var chart = workbook.Worksheets.SelectMany(x => x.Charts).ToList()[0];
chart.Calculate(new ChartCalculateOptions() { UpdateAllPoints = true });

for (var seriesIndex = 0; seriesIndex < chart.NSeries.Count; seriesIndex++)
{
	var nSeries = chart.NSeries[seriesIndex];

	for (var pointIndex = 0; pointIndex < nSeries.Points.Count; pointIndex++)
	{
		var point = nSeries.Points[pointIndex];
		Console.WriteLine($"Series: {seriesIndex}, Point: {pointIndex}, Text: {point.DataLabels.Text}");
	}
}

This gives:

Series: 0, Point: 0, Text: 100
Series: 0, Point: 1, Text: 200
Series: 0, Point: 2, Text: 300
Series: 0, Point: 3, Text: Custom Data Label 2
Series: 1, Point: 0, Text: 400
Series: 1, Point: 1, Text: Custom Data Label 1
Series: 1, Point: 2, Text: 800
Series: 1, Point: 3, Text: 1000
Series: 2, Point: 0, Text: 
Series: 2, Point: 1, Text: 
Series: 2, Point: 2, Text: 
Series: 2, Point: 3, Text:

Note the missing text for Series 2.

In Aspose 23.7, the code above without the ChartCalculateOptions returns the expected text for all points:

Series: 0, Point: 0, Text: 100
Series: 0, Point: 1, Text: 200
Series: 0, Point: 2, Text: 300
Series: 0, Point: 3, Text: Custom Data Label 2
Series: 1, Point: 0, Text: 400
Series: 1, Point: 1, Text: Custom Data Label 1
Series: 1, Point: 2, Text: 800
Series: 1, Point: 3, Text: 1000
Series: 2, Point: 0, Text: 100
Series: 2, Point: 1, Text: 500
Series: 2, Point: 2, Text: 900
Series: 2, Point: 3, Text: 1200

How do we get the data label text for the points in the third series in Aspose 24.8 or 24.9?

Thank you!
Laura Moon

@lauramoon,

Thanks for the template Excel file and details.

After initial testing, I was able to reproduce the issue you mentioned by using your sample file. I found that Chart.Calculate is not populating all data points data labels text when setting UpdateAllPoints option to true.

We require thorough evaluation of the issue. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNET-56743

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

1 Like

@lauramoon,

We are pleased to inform you your issue (Ticket ID: “CELLSNET-56743”) has been resolved. The fix/enhancement will be incorporated in the next release (Aspose.Cells v24.10) scheduled for the first half of October 2024. You will receive a notification once the new release is available.

The issues you have found earlier (filed as CELLSNET-56743) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi

Thank you for the bug fix!

We have confirmed we can once again get the expected data label text.

@lauramoon,

Thanks for your feedback.

We’re glad to hear your issue has been resolved with the new version/fix. Please don’t hesitate to reach out if you have any additional questions or comments.