3D chart perspective issue


I am attempting to set the perspective of “pie 3d exploded” chart with the following line of code:

asposeChart.setPerspective( xmlssChart.getRotation().getPerspective() );

*getPerspective returns a short value.

The issue I am running into is that any value I pass to setPerspective it results in being half the value in the resulting Excel file.

For example

I set the perspective to 10
asposeChart.setPerspective( 10 );

When I open the resulting Excel file the perspective on the pie chart is 5 and not 10. It seems to be slashing my entered value in half.

What would be causing this?

Thank you for your help.


Thanks for sharing the details and sample code.

After an initial test, I am able to reproduce the issue as you have described regarding Chart's "setPerspective ()" method for the XLSX file format. It always makes it half whatever value we put for the method. After further investigation, we will log a ticket into our database and figure it out soon.

Thank you."


After further evaluation of your issue, I have logged a ticket with an id “CELLSJAVA-40490” for your issue. We will look into your issue soon.

Once we have any update on it or we have sorted your issue out, we will let you know here.

Thank you.


Please try the attached fix/version: Aspose.Cells for Java v7.4.3.1.

We have fixed your issue now. We fixed the bug of getting/setting perspective of a 3D chart.

Let us know your feedback.

Thank you.

Hello Amjad,

I used the new version of Aspose.Cells and attempted to set the perspective of my 3D pie chart. Unfortunately the issue is still present.

Below is an example the code I used to set the perspective.

AsposeChart.setPerspective( (short) (10));

In the resulting Excel document the perspective is set at 5 instead of 10.

Thank you,


Well, I tested your issue with a template file (having a simple data source) using our latest fix v7.4.3.1, it works fine.

Here is my sample code and please find attached the input and output files here. I opened the output file into MS Excel and right click on the chart’s plot area / chart area and then click the 3-D Rotation to confirm the Perspective which is 10% set.

Sample code:

String filePath = “Population-In.xlsx”;

Workbook workbook = new Workbook(filePath);

ChartCollection charts = workbook.getWorksheets().get(0).getCharts();

Chart chart = charts.get(charts.add(ChartType.PIE_3_D_EXPLODED, 0, 0, 15, 8));

Series series = chart.getNSeries().get(chart.getNSeries().add("=Sheet1!$K5:N5", false));


workbook.save(“perspective1.out.xlsx”, SaveFormat.XLSX);

Please make sure that you are using the latest fix v7.4.3.1. If you still find the issue, kindly do paste the sample code (runnable) same as mine and attach your template files here, we will check your issue soon.

Thank you.

Hi Amjad,

I did a further review of the sample code you provided and found an error within my test code. The new version of Aspose.Cells appears to resolve the perspective issue I have been having.

Thank you very much for your help.



Good to know that you sorted it out and the new version/fix resolved your issue.

We have already closed your ticket now.

Feel free to contact us any time if you have further query or have some other issue, we will be happy to assist you soon.

thank you.

The issues you have found earlier (filed as CELLSJAVA-40490) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.