Jump to content
Software FX Community

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


User (Legacy)

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

Archived

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

×
×
  • Create New...