Page 1 of 1

Axes / Minimum / Maximum - without error message

Posted: Wed Sep 03, 2014 4:50 pm
by 16467044
Hi,

I set the range of an axes like this:

Chart1.LeftAxis.Maximum:=aValue;
Chart1.LeftAxis.Minimum:=anotherValue;

That often I read an error-message like, "the max value must be more / less than the min value" or similar.
Exchanging those lines had other useless error-message problems.
As the next line of code would fix this, those error-messages are nothing but annoying.
All my workarounds NOT to see this error-messages were ugly in the sense of "under the line unnecessary code".

Wasn't there a line to set Minimum and Maximum together and do the error-check at the end?
I thought to have seen it once, but cannot find it any more.

Thanks,
Cheryll

Re: Axes / Minimum / Maximum - without error message

Posted: Thu Sep 04, 2014 12:01 pm
by yeray
Hi Cheryll,
Chartist wrote:Wasn't there a line to set Minimum and Maximum together and do the error-check at the end?
I thought to have seen it once, but cannot find it any more.
Yes, SetMinMax() method:

Code: Select all

Chart1.Axes.Left.setMinMax(anotherValue, aValue);

Re: Axes / Minimum / Maximum - without error message

Posted: Thu Sep 04, 2014 2:33 pm
by 16467044
thank you so much!

Regards,
Cheryll