Click event of Axis Label.

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
amol
Advanced
Posts: 231
Joined: Tue Mar 29, 2005 5:00 am

Click event of Axis Label.

Post by amol » Fri Sep 11, 2015 10:31 am

Hi Steema,

We have one more query related to Click event of axis labels as soon in below Image.
2015-09-11_155605.png
Image 1
2015-09-11_155605.png (19.92 KiB) Viewed 5440 times
we want to open a message on click on Labels.

Thanks

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Click event of Axis Label.

Post by Christopher » Mon Sep 14, 2015 11:54 am

amol wrote: we want to open a message on click on Labels.
You could try something similar to:

Code: Select all

    Points series;
    private void InitializeChart()
    {
      tChart1.Aspect.View3D = false;
      tChart1.Zoom.Direction = ZoomDirections.None;
      series = new Points(tChart1.Chart);
      series.FillSampleValues(50);

      tChart1.MouseDown += tChart1_MouseDown;

    }

    void tChart1_MouseDown(object sender, MouseEventArgs e)
    {
      int index = tChart1.Axes.Bottom.Labels.Clicked(e.X, e.Y);
      if(index > -1) MessageBox.Show("Message");
    }
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Post Reply