Chart.Calculate() throws Attempted to divide by zero. exception

We are upgrading our Aspose Cells from 8.7.1 to 18.6.0. One of report with multiple chart starts breaking on Chart.Calculate() in new version and throws Attempted to divide by zero exception.
Please let me know the fix for that.

@kumarabhishek06,

Thanks for providing us details.

Could you provide us your template file and sample code (runnable) to reproduce the issue, we will check it soon.

SampleApplication.zip (3.9 MB)

Please check why Chart 8 is not displaying properly and Chart.Calculate method throws excption on my ocal development machine.

@kumarabhishek06

I have been able to notice the problem with chart but the exception is not reproduced. Please try Aspose.Cells for .NET 18.7 on your side and then update us if the problem exists. We have logged the issue in our database for investigation of chart problem and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSNET-46247 - Problem displaying charts

@kumarabhishek06

Please modify the code segment that set data of series, and then update us with your feedback.

string sheetName = "'Trailing Stats'";
chartSeries[0].Values = sheetName + "!$K$15:$K$" + _totalNumberOfRecords;
chartSeries[1].Values = sheetName + "!$S$15:$S$" + _totalNumberOfRecords;
chartSeries.CategoryData = sheetName + "!$A$15:$A$" + _totalNumberOfRecords;

Yes. That works. Thanks for your help.

@kumarabhishek06,

Good to know that your issue is sorted out by the suggested lines of code. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.