Getting grid coordinates after a mouse click

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
JRB
Newbie
Newbie
Posts: 3
Joined: Mon Mar 14, 2005 5:00 am

Getting grid coordinates after a mouse click

Post by JRB » Fri Jun 02, 2006 6:17 pm

Hi, I need to get the actual x-y values after the user has clicked somewhere on the graph. Any help would be appreciated, thanks.

JRB

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Jun 06, 2006 8:56 am

Hi JRB,

You can do this:

Code: Select all

    private void tChart1_MouseDown(object sender, MouseEventArgs e)
    {
      label1.Text = tChart1.Axes.Bottom.CalcPosPoint(e.X).ToString();
      label2.Text = tChart1.Axes.Left.CalcPosPoint(e.Y).ToString();      
    }
If it is not what are you exactly trying to get don't hesitate to ask it here.
Best Regards,
Narcís Calvet / 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

Post Reply