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();
imgOptions.setImageFormat(ImageFormat.getPng());
imgOptions.setHorizontalResolution(300);
imgOptions.setVerticalResolution(300);
imgOptions.setOnePagePerSheet(true);
imgOptions.setOnlyArea(false);
chart.toImage(“C:/temp/targetimage.png”, imgOptions);
Thanks,
Neeraj