himpact Posted November 9, 2007 Report Share Posted November 9, 2007 Hi, I'm just checking for a quick way to detect which axis section did the user click on. Is there away? Thanks HL Quote Link to comment Share on other sites More sharing options...
maximop Posted November 9, 2007 Report Share Posted November 9, 2007 To determine when a user clicks on an axis section you can do the following: void chart1_MouseDown(object sender, HitTestEventArgs e) { if (e.HitType == HitType.AxisSection) { MessageBox.Show("You clicked on AxisSection " + e.HitType); } } The e.HitType will return the name of the object hit; the e.Object will return the value of the from and to properties of the AxisSection. The HitTestEventArgs does not return the index of an AxisSection; only the index of a Series or Point. You can probably check for the range of values (from and to) of the AxisSection and then determine which section was clicked on based on which condition was met. Quote Link to comment Share on other sites More sharing options...
himpact Posted November 9, 2007 Author Report Share Posted November 9, 2007 Awsome... Thanks!!!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.