User (Legacy) Posted May 13, 2003 Report Share Posted May 13, 2003 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; } } } Link to comment Share on other sites More sharing options...
Software FX Posted May 14, 2003 Report Share Posted May 14, 2003 You can use the Axis.PixelToValue method to determine the logical value of a pixel position. This will tell you which label is the closest. -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.