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 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. Link to comment Share on other sites More sharing options...
himpact Posted November 9, 2007 Author Report Share Posted November 9, 2007 Awsome... Thanks!!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.