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();
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.