Real time charting - changing axis maximum

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
MTW
Newbie
Newbie
Posts: 21
Joined: Thu Jun 28, 2007 12:00 am

Real time charting - changing axis maximum

Post by MTW » Thu Oct 01, 2009 4:03 pm

I am charting data in real time - scrolling as per your example of charting data in real time.

My data can range from 0-100%. I would like the axis->maximum not to be less than 10%, otherwise, I would like it to scale automatically. I am adding data to the chart 5 times per second. I can set the axis->Automatic feature on before I add data, add the data, and then check the axis->Maximum value and see if it is below 10%. At that point I can then set it the Maximum to 10%. Is this correct - will this work? If I do this, will the chart be bouncing between the automatic settting and the 10% - which would then be hard to follow?

What would you suggest as the best way to implement this?

Thank you for your assistance.
M Weingarden

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

Re: Real time charting - changing axis maximum

Post by Yeray » Fri Oct 02, 2009 10:49 am

Hi M Weingarden,
MTW wrote:I can set the axis->Automatic feature on before I add data, add the data, and then check the axis->Maximum value and see if it is below 10%. At that point I can then set it the Maximum to 10%. Is this correct - will this work? If I do this, will the chart be bouncing between the automatic settting and the 10% - which would then be hard to follow?
I think that both answers are 'yes'. To do it this way, you'll need to repaint the chart to obtain the new left axis minimum and maximum calculated automatically, and then you'll need to check them and repaint the chart again if you decided to change the axis scale. So it would probably flicker if you do this 5 times per second.
MTW wrote:What would you suggest as the best way to implement this?
I think it would be more efficient if you check Series1.YValues.MaxValue each time you add a value to your series and actuate then in consequence without needing to repaint the chart to know it.
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