AtuoScales, margins, datetime labels

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Bob Yeatman
Newbie
Newbie
Posts: 18
Joined: Fri Nov 15, 2002 12:00 am

AtuoScales, margins, datetime labels

Post by Bob Yeatman » Mon Mar 23, 2009 3:49 pm

Hi,
I have a real-time teechart with fastlines that uses auto scaling for both the Y-axis (sensor measurements) and the bottom axis (Date-time). I have 2 questions.

1) My measurements start at 0 and then jumps up to about 25 (plus/minus 0.001). The left axis auto scaling sets the scale from 0 to 25. As a result, the data line is difficult to see because it is either all the way on the bottom of the plot (at 0) or all the way at the top of the plot (at about then maximum, 25). Is there a way to increase the scales a little (say 10% of the scale range) so the data line is slightly above the bottom and below the top of the plot? This would make the data plot much easier to see.

2) My plot's bottom axis is DateTime. Although the axis is auto scaling it does not automatically change the date label (i.e. If I set the label format to h:mm I can not see seconds when the test starts. If I change the label format to include seconds the axis labels looks silly after the test has been running for several days => we do not need to show seconds anymore). How can I get the DT labels to automatically change formats for the date-time range?
I am using Delphi 6 with Teechart 8.04
Thanks
Robert

Bob Yeatman
Newbie
Newbie
Posts: 18
Joined: Fri Nov 15, 2002 12:00 am

Post by Bob Yeatman » Tue Mar 24, 2009 11:51 am

Where can I put a "display label procedure"to change the DateTime lables depending on the plots date-time range. It is easy to "manually" adjust the display formats but I am not sure where the procedure should be called from. Which OnEvent is best?

Is there a hidden OnAfterAutoScaling event available so that I call a procedure to manually adjust the Left axis to give some space on the chart so that the plot can clearly been seen? If not is it possible to add a "magnification factor" to the autoscale routine so the automatic scales are slightly greater than the data (min and max)?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Mar 24, 2009 3:16 pm

Hi Robert,
Where can I put a "display label procedure"to change the DateTime lables depending on the plots date-time range. It is easy to "manually" adjust the display formats but I am not sure where the procedure should be called from. Which OnEvent is best?
I'd try parsing labels or setting their format in the OnGetAxisLabel or OnGetNextAxisLabel events.
Is there a hidden OnAfterAutoScaling event available so that I call a procedure to manually adjust the Left axis to give some space on the chart so that the plot can clearly been seen? If not is it possible to add a "magnification factor" to the autoscale routine so the automatic scales are slightly greater than the data (min and max)?
Yes, you can use axes MinimumOffset and MaximumOffset properties for that.

Hope this helps!
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Bob Yeatman
Newbie
Newbie
Posts: 18
Joined: Fri Nov 15, 2002 12:00 am

Post by Bob Yeatman » Thu Mar 26, 2009 1:40 pm

Hi Narcís,
Thanks for the info... your suggestions worked great!

Post Reply