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

Free Support Forum - aspose.com

How to decrease the plot area for chart

Need assistance in decreasing plot area for a chart using Aspose.Cells for Java API.

Used the following link for changing the position & size of the chart but it is not reflected.

Attached sample excel with the chart for your reference.
SampleExcel.zip (8.8 KB)

Thanks in advance.

@SrideviG,

Please notice, I am able to reproduce the issue as you mentioned. I tried to minimize the plot area but to no avail. I used the following sample code with your template file but the plot area is not changed.
e.g.
Sample code:

         Workbook workbook = new Workbook("f:\\files\\SampleExcel.xls");

         Worksheet worksheet = workbook.getWorksheets().get(0);

         Chart chart = worksheet.getCharts().get(0);

         chart.getPlotArea().setY(833);
         chart.getPlotArea().setX(58);
         chart.getPlotArea().setHeight(2798);
         chart.getPlotArea().setWidth(2919);

         chart.calculate();


         workbook.save("f:\\files\\out1.xls");

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

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

1 Like

@SrideviG,

This is to inform you that your issue has been resolved. The fix will be included in the next official release (Aspose.Cells v22.9) which is scheduled to be released in the second week of September 2022. You will also be notified when the next version is published.