We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Regression of chart PDF rendering from 17.3.3 to 17.10.2

Aspose.Cells fails to render updated chart in PDF in 17.10.2 compared to 17.3.3. The issue is observed for the sample XLSX book1.zip (13.3 KB) and the following code:

var wb = new Workbook(GetFullPath("book1.xlsx"));
wb.Worksheets[0].Cells["B1"].Value = System.DateTime.Parse("11/8/17");
wb.Worksheets[1].Cells["C2"].Value = 15;
wb.CalculateFormula();
wb.Worksheets[2].Charts[0].Calculate();
wb.Save(GetFullPath("result.pdf"), SaveFormat.Pdf);

Aspose.Cells 17.3.3 produces chart1733.PNG (6.2 KB) which reflects changes in B1 and C2.

Aspose.Cell 17.10.2 produces chart17102.PNG (6.3 KB) where the chart is rendered from the original workbook ignoring changes.

Another question, why the formula is rendered as an error, maybe its another issue.

@dzmitry.martynau

Thanks for using Aspose APIs.

The issue is caused by

//Setting value
wb.Worksheets[0].Cells["B1"].Value = System.DateTime.Parse("11/8/17");

When you change the value of "B1” of "Params” sheet, the NamedRange will be incorrect. The data source of chart refers to the NamedRange. So the chart will not be proper.

You can repeat the error in MS Excel. Please open the source file (i.e. book1.xlsx) in MS Excel and then change "B1” value of "Params” sheet. You will find MS-Excel throws an error.

In old version, we did not consider NamedRange for chart. So the result looks right.

Screenshot Showing the Error