Chart legend is cut off in the output image

Hello,
we are using Java, we are using aspose cells 22.2 right now, but get same results on 22.11. When creating image from chart legend name is cut off. Adding excel file and produced image from chart in file.chart-data.zip (486.6 KB)

Could you help us with that?

@ANDREA.FARRIS,

Thanks for the template file and screenshots.

Please notice, I am able to reproduce the issue as you mentioned by rendering the chart in the worksheet to image format. I found some chart legend items are cut off in the output image:
e.g.
Sample code:

Workbook workbook = new Workbook("f:\\files\\test-chart.xlsx");
WorksheetCollection ws = workbook.getWorksheets();
Chart chart = ws.get("sheet").getCharts().get(0);
ImageOrPrintOptions imgOptions = new ImageOrPrintOptions();
imgOptions.setImageType(ImageType.PNG);
chart.toImage("f:\\files\\out1.png", imgOptions);

I have logged a ticket with an id “CELLSJAVA-45008” for your issue. We will look into it soon.

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

Hi @ANDREA.FARRIS
For this issue, The result of our optimization is shown below, which will take effect in the next version.

CELLSJAVA45008.png (7.6 KB)

The issues you have found earlier (filed as CELLSJAVA-45008) have been fixed in Aspose.Cells for Java 23.1.