How to get Multi Yvals in Multi series in vbscript

TeeChart for ActiveX, COM and ASP
Post Reply
Richard
Newbie
Newbie
Posts: 40
Joined: Mon May 21, 2001 4:00 am

How to get Multi Yvals in Multi series in vbscript

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
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
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply