How to get the actual max and min X values of lines?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Carl
Newbie
Newbie
Posts: 11
Joined: Fri Nov 21, 2008 12:00 am
Contact:

How to get the actual max and min X values of lines?

Post by Carl » Tue May 19, 2009 8:30 am

There are several lines in the Tchart. The lines are draged and zoomed in.
I want to get the actual left and the right X values of lines in the area of tchart. There are not the maxmum and the minimum of the axis.
How?

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

Post by Yeray » Tue May 19, 2009 8:46 am

Hi Carl,

Here there is a thread with a function that calculates Min and Max visible values. Note that this is delphi code. You shouldn't find too much problems translating it but if you find any, don't hesitate to let us know.
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

Carl
Newbie
Newbie
Posts: 11
Joined: Fri Nov 21, 2008 12:00 am
Contact:

Post by Carl » Fri May 22, 2009 8:33 am

Thanks for your suggestion.
And,I found an another solution to get max and min visible values:

DateTime time1=DateTime.FromOADate(Series[0].XValues[Series[0].FirstVisibleIndex]);
DateTime time2=DateTime.FromOADate(Series[0].XValues[Series[0].LastVisibleIndex]);

Another problem:
The bottom axis is a custom axis, meanwhile it’s a DateTime axis.
But the default DateTime format is duodecimal, I want to change to 24 system, how to set the label’s DateTime format?

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

Post by Yeray » Fri May 22, 2009 9:09 am

Hi Carl,

If I understand well, you can customize this setting bottom axis Labels.DateTimeFormat property.

You'll find information on how to use this property in Tutorial 4 - Axis Control. Tutorials are available at TeeChart's program group.
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