Event of Axis

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

Event of Axis

Post by amol » Fri Feb 28, 2014 1:36 pm

Hi Steema Support,
How can get the event of Axis as shown in fig.
Untitled.png
Untitled.png (39.75 KiB) Viewed 5008 times
When we click or double click on Bottom Axis it Should raise a Message to showing that Bottom axis clicked .
It will so helpful for us if you please provide any alternative solution.

Thanks in advance.

Thanks and Regards
Planoresearch

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

Re: Event of Axis

Post by Christopher » Fri Feb 28, 2014 3:47 pm

amol wrote:When we click or double click on Bottom Axis it Should raise a Message to showing that Bottom axis clicked .
It will so helpful for us if you please provide any alternative solution.
Of course. Please try code such as the following:

Code: Select all

   private void InitializeChart()
    {
      tChart1.Series.Add(typeof(Bar)).FillSampleValues();
      tChart1.MouseDown += tChart1_MouseDown;
    }

    void tChart1_MouseDown(object sender, MouseEventArgs e)
    {
      if (tChart1.Axes.Bottom.Clicked(e.X, e.Y))
      {
        tChart1.Zoom.Active = false;
        MessageBox.Show("Bottom axis clicked!");
      }
      else
      {
        tChart1.Zoom.Active = true;
      }
    }
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