Page 1 of 1
Get Point values
Posted: Thu Sep 16, 2004 11:23 pm
by 9081031
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.
Posted: Fri Sep 17, 2004 8:58 am
by Pep
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