Return type of chart.getActualChartSize()


According to the official documentation at Chart | Aspose.Cells for Java API Reference ,

the return type of the function getActualChartSize is java.awt.Dimension.

When i run this code,

Worksheet sheet = book.getWorksheets().get("Sheet1");

    ChartCollection chartCollection = sheet.getCharts();

    for(Object chartObj:chartCollection) {
        Chart chart = (Chart) chartObj;

the result I get is
class com.aspose.cells.b.a.b.zs

This class cannot be casted to the class Dimension as well. Can you please tell me what im doing wrong?


We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSJAVA-42735 - Return type of getActualChartSize method


This is to inform you that we have fixed your issue now. We will provide you the fixed version in the next week (hopefully) after performing QA and including other enhancements and fixes.

We will provide a new method for the task:
int[] getActualChartSize() in such way that the array is int[0] which refers to width and int[1] = height.

Thank you very much


Please try our latest version/fix: Aspose.Cells for Java v18.10.3 (attached)

Your issue should be fixed. You may use chart.getActualChartSize()[0] for width and chart.getActualChartSize()[2] for height.

Let us know your feedback.
Aspose.Cells for (6.3 MB)

The issues you have found earlier (filed as CELLSJAVA-42735) have been fixed in Aspose.Cells for Java 18.11. You can also get the latest Aspose.Cells for Java version from Maven repos. with simple configurations. Please see the document for your reference: Installation|Documentation

This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi