Get Point values

TeeChart for ActiveX, COM and ASP
Post Reply
Scrub
Newbie
Newbie
Posts: 5
Joined: Mon Mar 08, 2004 5:00 am
Location: Sisters, Oregon
Contact:

Get Point values

Post by Scrub » Thu Sep 16, 2004 11:23 pm

This really isn't rocket science. I would like to display the value of a graphed point. I see the OnClickSeries event will do that, but it also appears to display data for areas that are just on the line between points and not just for point data.

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri Sep 17, 2004 8:58 am

Hi,

to get the values of the clicked points you can use similar code to the following :

Code: Select all

Private Sub Form_Load()
With TChart1
    .AddSeries scArea
    .Series(0).FillSampleValues (5)
    .AddSeries scPoint
    .Series(1).FillSampleValues (5)
End With
End Sub


Private Sub TChart1_OnClickSeries(ByVal SeriesIndex As Long, ByVal ValueIndex As Long, ByVal Button As TeeChart.EMouseButton, ByVal Shift As TeeChart.EShiftState, ByVal X As Long, ByVal Y As Long)
    If SeriesIndex = 1 Then
        MsgBox "X: " & ValueIndex & " Y: " & TChart1.Series(1).YValues.Value(ValueIndex)
        TChart1.StopMouse
    End If
End Sub

Post Reply