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

Free Support Forum - aspose.com

How to get the max/min bound values of value axis in the chart

Hi,

I am using the Aspose.slides.chart component to insert a chart in the slide, after the chart is created, how can I retrieve the max/min bounds values of value axis, I check the chart.getAxes().getVerticalAxis().getMajorUnit() and chart.getAxes().getVerticalAxis().getMinorUnit() properties, but their value are nothing. Is there any way to get these values?

Hi RK,


I have observed your comments. Can you please share sample presentation so that we can help you to achieve your requirements.

Best Regards,

Hi Muhammad ,


I am looking for method in aspose slides which will return value axis major and minor unit as per the chart.Calculate() method in Aspose.Cells for .NET.
<a rel=“nofollow” href="

Hi RK,


I have observed your comments. I have shared code snippet with you. I hope you will find it helpful on your end. Please share feedback with us if there is still an issue.

chart.getAxes().getVerticalAxis().getMinValue();

chart.getAxes().getHorizontalAxis().getMinValue();


chart.getAxes().getVerticalAxis().getMaxValue();

chart.getAxes().getHorizontalAxis().getMaxValue();

Best Regards,

Hi Muhammad,


chart.getChart().getAxes().getVerticalAxis().setAutomaticMajorUnit(true);
chart.getChart().getAxes().getVerticalAxis().setAutomaticMaxValue(true);

I have used above methods in my code to generate chart according to auto major and max value and At particular point in my code i want to retrieve these auto set major unit and max value.
when i used below methods i did not get any values.

chart.getChart().getAxes().getVerticalAxis().getMajorUnit()
chart.getChart().getAxes().getVerticalAxis().getMaxValue()


Hi,


I have observed your comments. We will get back to you with feedback soon.

Best Regards,