Page 1 of 1

Click event of Axis Label.

Posted: Fri Sep 11, 2015 10:31 am
by 9526439
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 5561 times
we want to open a message on click on Labels.

Thanks

Re: Click event of Axis Label.

Posted: Mon Sep 14, 2015 11:54 am
by Christopher
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");
    }