X-axis scale is incorrect in PNG output of excel chart

Hello,

I am using Aspose.Cells v18.2.1 to generate PNG of chart - “Chart 1” in the attached excel file. The x-axis scale used in PNG output is incorrect.

Following code is used to generate the output:

Workbook workbook = new Workbook(“test.xlsx”);
WorksheetCollection ws = workbook.getWorksheets();
String worksheetName = “WP2020”;
Chart chart = ws.get(worksheetName).getCharts().get(“Chart 1”);
ImageOrPrintOptions imgOptions = new ImageOrPrintOptions();
imgOptions.setImageFormat(ImageFormat.getPng());
chart.toImage(“aspose response 18.2.1.png”, imgOptions);

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

Can you please analyse this issue.

Thanks,
Neha

@Neha_Gautam

Thanks for using Aspose APIs.

We were able to observe this issue and logged it in our database for investigation and for a fix. Once, the issue is resolved or we have some other news for you, we will let you know asap.

This issue has been logged as

  • CELLSJAVA-42561 - X-Axis Scale is incorrect in PNG output of Excel Chart

@Neha_Gautam

Thanks for using Aspose APIs.

This is to inform you that we have fixed your issue CELLSJAVA-42561 now. We will soon provide the fix after performing QA and including other enhancements and fixes.

The issues you have found earlier (filed as CELLSJAVA-42561) have been fixed in this Aspose.Cells for Java 18.3 update. Please also check

The issues you have found earlier (filed as CELLSJAVA-42561) have been fixed in this Aspose.Cells for Java 18.3 update. Please also check the document for your reference: Installation|Documentation