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

Free Support Forum - aspose.com

Chart to PNG rendering issues

I am using Aspose cells java version 8.5.2.

Following 2 issues are encountered while generating PNG from the chart:
1. Format of date being displayed in the axis labels is not the same as in the source excel file.
2. Lot of small vertical lines appearing under the plot area and above the axis labels.

For your reference, the source excel file along with the generated png file is attached herewith.

Following is the code snippet being used to generate the PNG file:
Workbook workbook = new Workbook(“C:/temp/ChartIssue.xlsx”);
com.aspose.cells.Worksheet selectedWorksheet = workbook.getWorksheets().get(“Workings”);

com.aspose.cells.Chart chart = selectedWorksheet.getCharts().get(“Axis and Scale test”);

ImageOrPrintOptions imgOptions = new ImageOrPrintOptions();

chart.toImage(“C:/temp/targetimage.png”, imgOptions);


Hi Neeraj,

Thank you for sharing the sample spreadsheet.

We have evaluated the presented scenario while using the latest version of Aspose.Cells for Java 8.5.2, and we are able to replicate the mentioned issues therefore a ticket with Id CELLSJAVA-41463 has been logged in our bug tracking system. Our product team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.

Hi Neeraj,

Please try the latest version of Aspose.Cells for Java against the problem logged earlier as CELLSJAVA-41463 and let us know of your feedback.