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

Free Support Forum - aspose.com

IRotation3D sets wrong parameters

IRotation3D.setRotationY() sets X.

IRotation3D.setRotationX() sets Y.

Not sure how this made it past testing? Output attached.

public static void main(String[] args) throws Exception {
final Presentation pres = new Presentation();
final IChart c = pres.getSlides()
.get_Item(0)
.getShapes()
.addChart(
ChartType.Pie3D,
0, 0, 720, 540);
// Sets X
c.getRotation3D().setRotationY(90);
// Sets Y
c.getRotation3D().setRotationX((byte)40);
pres.save(“D:/test.pptx”, SaveFormat.Pptx);
Desktop.getDesktop().open(new File(“D:/test.pptx”));
}

Hi Shaun,


Thank you for your interest in Aspose.Slides.

I have observed your comments and like to share with you that it is not an issue, but the explanation for this behavior is the different interpretations of 3D rotation properties in ECMA-376 standard and PowerPoint. The chart.xml ‘rotX’ item is interpreted as ‘Y rotation’ and ‘rotY’ - as ‘X rotation’ option in PowerPoint UI (see explanation.jpg).

Moreover, the description of these properties is as under,

Chart.Rotation3D.RotationX property returns or sets the rotation degree around the X-axis, i.e. in the Y direction for 3D charts (between -90 and 90 degrees). The property matches with the 21.2.2.157 rotX (X Rotation) item in ECMA-376 and with the “Y Rotation” option in PowerPoint 2007+

Chart.Rotation3D.RotationY property returns or sets the rotation degree around the Y-axis, i.e. in the X direction for 3D charts (between 0 and 360 degrees). The property matches with the 21.2.2.158 rotY (Y Rotation) item in ECMA-376 and with the “X Rotation” option in PowerPoint 2007+.

I hope this will clarify the concept. Please share if I may help you further in this regard.

Best Regards,