TeeChart for ActiveX, COM and ASP
-
Richard
- Newbie
- Posts: 40
- Joined: Mon May 21, 2001 4:00 am
Post
by Richard » Mon Dec 05, 2005 8:21 am
hi,
Now i add two series in TChart1, and add data for them.i want to get self series1,series2 Yvalues Corresponding to Point(x) When i move mouse.
sb can add codes in my code.or give me some suggestion or other ways.
Code: Select all
<script language="vbscript">
Sub TChart1_OnMouseMove(shift,X,Y)
<!--Move Mouse get the YVal of the closed point -->
End
</script>
-
Narcís
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
-
Contact:
Post
by Narcís » Mon Dec 05, 2005 9:48 am
Hi Richard,
You can use something like:
Code: Select all
Private Sub TChart1_OnMouseMove(ByVal Shift As TeeChart.EShiftState, ByVal X As Long, ByVal Y As Long)
Dim index As Integer
For i = 0 To TChart1.SeriesCount - 1
index = TChart1.Series(i).Clicked(X, Y)
If (index <> -1) Then
Label1.Caption = "Series" + CStr(i) + ": " + _
CStr(TChart1.Series(i).YValues.Value(index))
End If
Next
End Sub