Jump to content
Software FX Community

Get section that was clicked?


Recommended Posts

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


This topic is now archived and is closed to further replies.

  • Create New...