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
Getting point indexes
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Kejpa,
You can get those indexes and its value doing something like:
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
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |