Page 1 of 1
How to get the actual max and min X values of lines?
Posted: Tue May 19, 2009 8:30 am
by 13050934
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?
Posted: Tue May 19, 2009 8:46 am
by yeray
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.
Posted: Fri May 22, 2009 8:33 am
by 13050934
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?
Posted: Fri May 22, 2009 9:09 am
by yeray
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.