Round Corner on Chart Area Border

Does anyone know if thee is there a programmatic way yo round the corners of a chart? Excel has “Round Corners” check box on Format Chart Area - Border Style but I don’t see a way to get at setting that from Aspose Cell .

Hi Shane,

Thanks for your posting and using Aspose.Cells for Java.

You need to use the Chart.setRectangularCornered() with false parameter. By default, it is true. Once, you set it false, then chart area corners become round.

Please see the following code and check the source and output xlsx files. I have also attached the screenshot for your reference. As you can see, the chart area corners have become round now.

Java


String filePath = “F:\Shak-Data-RW\Downloads\source.xlsx”;


Workbook workbook = new Workbook(filePath);


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


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


//Make the chart area corners round

chart.setRectangularCornered(false);


workbook.save(filePath + “.out.xlsx”);

Screenshot:

That’s what I was looking for. Thank you

Hi Shane,

Thanks for your feedback and using Aspose.Cells for Java.

It is good to know that given method fulfills your need. Let us know if you encounter any other issue, we will be glad to look into it and help you further.