Jump to content
Software FX Community

Get section that was clicked?


himpact

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...