Excel chart is not rendered properly when converting it to PNG format

Hello,

I am using Aspose.Cells v19.4 to generate PNG of chart - “Chart 22” in the attached excel file. The PNG output is not the same as the original chart.
The y-axis labels are incorrect, the scale of x-axis labels is incorrect, y-axis title is incorrect and the legends are not appearing in a single line as in the original chart.

Following code is used to generate the output:

Workbook workbook = new Workbook(“test.xlsx”);
WorksheetCollection ws = workbook.getWorksheets();
String worksheetName = “IMR Regn”;
Chart chart = ws.get(worksheetName).getCharts().get(“Chart 22”);
ImageOrPrintOptions imgOptions = new ImageOrPrintOptions();
imgOptions.setImageType(ImageType.PNG);
chart.toImage(“aspose response 19.4.png”, imgOptions);

PFA below the source excel and PNG output:
attachments.zip (622.9 KB)

Can you please look into this.

Thanks,
Neha

@Neha_Gautam,

Thanks for the template file and screenshot.

After an initial test, I am able to observe the issue as you mentioned by highlighting in the comparison screenshot. I used your template file and sample code and found the output image of chart has a few discrepancies. I confirmed the y-axis labels are incorrect, the scale of x-axis labels is incorrect, y-axis title is incorrect and the legends are not appearing in a single line as in the original chart. I have logged a ticket with an id “CELLSJAVA-42897” for your issue. We will look into it soon.

Once we have an update on it, we will let you know.

Hi,

Is there any update on this? We need to provide a fix for this issue to our customer in our upcoming product release next month, so we need a fix for this ASAP. Can you provide any tentative date for when this issue will be resolved?

Thanks,
Neha

@Neha_Gautam,

I am afraid, your issue is not sorted out yet, it is “in Progress” though. I have logged your concerns against your issue. We will check if we could provide you an update or eta (if it will take more time) for your issue.

We are sorry for any inconvenience caused!

@Neha_Gautam,

We hope we can provide you the fixed version for the issue before the end of this week or in the next week (early).

Keep in touch.

@Neha_Gautam,

Please try our latest fix: Aspose.Cells for Java v21.4.2:

aspose-cells-21.4.2-java.zip (7.3 MB)

Your issue should be fixed in it.

Let us know your feedback.