Jump to content
Software FX Community

How to determine which label/series was clicked on the X Axis


User (Legacy)
 Share

Recommended Posts

Hello,

I need to be able to determine which label/series was clicked when the

chartFX.AxisX axis is clicked by the user. The below code snippet shows

that I also processing the click event for the LegendBox and the Points. I

have removed the code for this but left some of the HitType.Axis code. I am

able to determine which axis was clicked but I cannot figure out how to find

the associated label/series. How can I do this?

Thanks in advance,

Bob

private void chartFX_MouseDown(object sender,

SoftwareFX.ChartFX.MouseEventArgsX e)

{

if( e.Button == MouseButtons.Left )

{

switch( e.HitType )

{

case HitType.Axis :

if( chartFX.AxisX == (SoftwareFX.ChartFX.Axis)e.Object )

{

// what do I do here?

}

e.Handled = true;

break;

case HitType.LegendBox :

// code removed

e.Handled = true;

break;

case HitType.Point :

// code removed

e.Handled = true;

break;

}

}

}

post-2106-13922394667686_thumb.png

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.

 Share

×
×
  • Create New...