Page 1 of 1

Event of Axis

Posted: Fri Feb 28, 2014 1:36 pm
by 9526439
Hi Steema Support,
How can get the event of Axis as shown in fig.
Untitled.png
Untitled.png (39.75 KiB) Viewed 5007 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

Re: Event of Axis

Posted: Fri Feb 28, 2014 3:47 pm
by Christopher
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;
      }
    }