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

Free Support Forum - aspose.com

Pie chart rotation

hi,

i created a a pie chart with aspose but i’m not finding how can i set the rotation for the Y axe ( not the z one).

sorry for the double postiong but i need also how to rotate the pie for the X axe.

Hi,

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

Please use Chart.RotationAngle for your needs. Let me know if it works for you.

If it does not work, then provide us your source and expected output xls/xlsx files which you can create manually using Ms-Excel 2010.

thanks for the quick response . i’m really happy for the godd job that u do.


for rotating the pie ine the X axe i find out the solution :
chart.getNSeries().get(0).setFirstSliceAngle(theAngle);

but for the Y one no solution.

i put in the attached file an example created manually.

Hi,

Thanks for providing your sample file.

Please use these properties.

Chart.setElevation() - for Y axis
Chart.setRotationAngle() - for X axis

for your needs.

Please see the following sample code for your reference. I have also attached the source and output xlsx file.

Java


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


Workbook workbook = new Workbook(filePath);


Chart ch = workbook.getWorksheets().get(0).getCharts().get(0);


ch.setRotationAngle(37);

ch.setElevation(53);


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


Screenshot:

thanks it was really helpful.

Hi,

Thanks for your feedback and using Aspose.Cells.

It’s good to know your issue is now resolved.

Let us know if you face any other issue relating to Aspose.Cells, we will be glad to assist you further.

Please also download and try the latest Offline - Aspose.Cells for .NET C#/VB.NET Demos. It will help you to get familiar with Aspose.Cells for .NET API quickly.