Axis Maximum Value must be >= Minimum

TeeChart for ActiveX, COM and ASP
Post Reply
nbp
Newbie
Newbie
Posts: 15
Joined: Fri Apr 01, 2016 12:00 am

Axis Maximum Value must be >= Minimum

Post by nbp » Wed Mar 08, 2017 8:33 pm

I'm using TChart 2015 ocx. I'm using the following piece of code to set the maximum and minimum values for the left axis
but I get an exception "Axis Maximum Value must be >= Minimum"

Code: Select all


double fIncr;
double fMax, fMin;
fMax = -0.6;
fMin = -0.35
fIncr = (fMax - fMin)/10;

CurrentAxis.SetAutomatic(false);
CurrentAxis.SetAutomaticMaximum(false);
CurrentAxis.SetAutomaticMinimum(false);

CurrentAxis.SetMaximum(fMax);  
CurrentAxis.SetMinimum(fMin);
CurrentAxis.SetIncrement(fIncr);
However, when I replace it with CurrentAxis.SetMinMax(....) the exception goes away. Not sure why...

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

Re: Axis Maximum Value must be >= Minimum

Post by Yeray » Thu Mar 09, 2017 11:10 am

Hello,

When you manually assign Maximum to -0.6, the Minimum is still 0 and it crashes. If you assigned Minimum before assigning Maximum it should work fine.
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

Post Reply