Determin Axes on ClickAxis Event

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
AGF
Newbie
Newbie
Posts: 34
Joined: Mon Feb 21, 2011 12:00 am

Determin Axes on ClickAxis Event

Post by AGF » Wed Jun 01, 2011 6:13 pm

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

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Determin Axes on ClickAxis Event

Post by Sandra » Thu Jun 02, 2011 11:54 am

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,
Best Regards,
Sandra Pazos / 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

AGF
Newbie
Newbie
Posts: 34
Joined: Mon Feb 21, 2011 12:00 am

Re: Determin Axes on ClickAxis Event

Post by AGF » Thu Jun 02, 2011 2:42 pm

Dear Sandra,

it works well.

Thanks

Post Reply