Axes / Minimum / Maximum - without error message

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Chartist
Newbie
Newbie
Posts: 60
Joined: Wed Sep 18, 2013 12:00 am

Axes / Minimum / Maximum - without error message

Post by Chartist » Wed Sep 03, 2014 4:50 pm

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
Cheryll

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Axes / Minimum / Maximum - without error message

Post by Yeray » Thu Sep 04, 2014 12:01 pm

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);
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Chartist
Newbie
Newbie
Posts: 60
Joined: Wed Sep 18, 2013 12:00 am

Re: Axes / Minimum / Maximum - without error message

Post by Chartist » Thu Sep 04, 2014 2:33 pm

thank you so much!

Regards,
Cheryll
Cheryll

Post Reply