Free Support Forum - aspose.com

How to set autoMax in ValueAxis

Hi,
looking at the ValueAxis API[0] I’m not able to find a way to set the autoMax property. I can only access it through the isAutoMax() method.

Could please somebody point me in the right way on doing this? I’m using version 2.5.0 of aspose-cells.

Regards

[0]: https://apireference.aspose.com/cells/java/com.aspose.cells/Axis

Hi,



Well, I think for Axis in Chart, you do not need to do anything if you
want MS Excel should evaluate/determine the properties automatically,
such as, MinValue, MaxValue, MajorUnit, MinorUnit. If you set these
Chart’s attributes by using Aspose.Cells API e.g setMaxValue(),
setMinorUnit(), setMinValue() etc. then, MS Excel will not calculate
these properties (automatically) but according to your provided values
for these attributes.



Thank you.

Dunno if I’ve been clear enough.
What I’m looking for is a way for setting the autoMax property in the ValueAxis object expecting it behaves the same way as if I set the Axis.MaximumScaleIsAuto[0] property using vba.
That way, if I extract the chart and convert it to an image I’ll get it with the Y values not out-scaled.

Is that possible?

[0]: http://msdn.microsoft.com/en-us/library/bb208747%28v=office.12%29.aspx

Hi,

Thanks for providing us further details.

I have logged it with id: CELLSJAVA-26627 into our issue tracking system. We will look into it. Once we have any update about it, we will let you know here.

Thank you.

Hi,

Please download the Aspose.Cells for Java (Latest Version).

Please try the new fix. Now we have provided new APIs for CategoryAxis and ValueAxis to set properties as automatic:

setAutoCross();
setAutoMajorUnit();
setAutoMinorUnit();
setAutoMax();
setAutoMin();

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


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