Page 1 of 1
Determin Axes on ClickAxis Event
Posted: Wed Jun 01, 2011 6:13 pm
by 15658604
Hi
How can i determine witch axes is clickt on the click axis Event - the example witch comes with the doc's don't work after translating to vb.net!
Thanks
Re: Determin Axes on ClickAxis Event
Posted: Thu Jun 02, 2011 11:54 am
by 10050769
Hello AGF,
I have made a simple example using last version of TeeChart.Net and detected correctly, the axis is selected.
Code: Select all
Public Sub New()
InitializeComponent()
InitializeChart()
End Sub
Private Sub InitializeChart()
Dim series1 As New Steema.TeeChart.Styles.Line(tChart1.Chart)
series1.FillSampleValues()
AddHandler TChart1.ClickAxis, AddressOf tChart1_ClickAxis
End Sub
Private Sub tChart1_ClickAxis(ByVal sender As Object, ByVal e As MouseEventArgs)
If sender.Equals(TChart1.Axes.Bottom) Then
Me.Text = "XBottom Pixels value: " & e.X.ToString() & " YBottom Pixes value: " & e.Y.ToString()
ElseIf sender.Equals(TChart1.Axes.Left) Then
Me.Text = "XLeftPixels value: " & e.X.ToString() & " YLeftPixels value: " & e.Y.ToString()
End If
End Sub
Please, could you check if previous code works as you expected?
Thanks,
Re: Determin Axes on ClickAxis Event
Posted: Thu Jun 02, 2011 2:42 pm
by 15658604
Dear Sandra,
it works well.
Thanks