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

Free Support Forum - aspose.com

Unable to get PlotArea dimensions from ChartEx

Hello,


I have added a chart and I’m trying to get the PlotArea position and dimension of that chart, but all the values are NaN.
I’m running the following code:

PresentationEx pres = new PresentationEx();
SlideEx slide = pres.Slides[0];
ChartEx chart = slide.Shapes.AddChart(ChartTypeEx.PercentsStackedColumn, 50, 50, 500, 400);
float x = chart.PlotArea.X;
float y = chart.PlotArea.Y;
float w = chart.PlotArea.Width;
float h = chart.PlotArea.Height;

Debugging the above variables results in NaN values on all, as shown in the attached screenshot.

I need a way to get these PlotArea properties from the chart.

Thank you!

Pierre

Hi Pierre,


I have observed the requirement shared by you and suggest you to please visit the this thread link that has exactly the same answers that you are looking for. Please share, if there is still an issue and I will try my best to help you further.

Many Thanks,

Hi Mudassir,


Thank you for your reply.

I have checked the following link earlier before posting my question but it does not answer my question.

The post that you have shared is explaining how to SET the properties X, Y, Width and Height of the PlotArea of a chart, whereas I am looking to GET these properties.

In fact, I have a chart, with a PlotArea and Legend next to the PlotArea. What I need to get is the exact Width of the PlotArea inside the Chart, without taking into consideration the width of the legend.

Let me know if this sounds clearer.

Thank you,

Pierre

Hi Pierre,


I have observed the issue shared by you and have been able to reproduce it. It seems that when setting the default chart values, there is some issue PlotArea values. An issue with ID SLIDESNET-33992 has been created in oru issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

We are sorry for your inconvenience,

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


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

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


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