TeeChart for ActiveX, COM and ASP
-
SAJ
- Newbie

- Posts: 8
- Joined: Fri Nov 15, 2002 12:00 am
-
Contact:
Post
by SAJ » Tue Jun 07, 2005 8:52 am
Hi!
I'd like to obtain the point indexes for the
visible points in my chart.
The bottom axis is date-time and the left axis has doubles.
I've tried cht.Series(0).XValues.Locate(cht.Axis.bottom.Minimum) but it seems like there is no point at that exact value and so it returns -1
TIA
/Kejpa
-
Narcís
- Site Admin

- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
-
Contact:
Post
by Narcís » Tue Jun 07, 2005 9:29 am
Hi Kejpa,
You can get those indexes and its value doing something like:
Code: Select all
Private Sub TChart1_OnAfterDraw()
For j = TChart1.Series(0).FirstValueIndex To TChart1.Series(0).LastValueIndex - 1
Label1.Caption = Label1.Caption + "Index: " + CStr(j) + ", " + CStr(TChart1.Series(0).XValues.Value(j))
Next j
End Sub