Bober02 Posted July 23, 2010 Report Share Posted July 23, 2010 Hey there, I am trying to read mouse position relative to plot area (so X represents the value on the XAxis over which mouse is currently hovering over). I managed to get it right using histTest for MouseDown event like this: HitTestResults hitTest = chart1.HitTest(e.GetPosition(chart1));if (!hitTest.IsInsidePlotArea) return null; Axis xAxis = chart1.AxisX;Axis yAxis = chart1.AxisY; double X = xAxis.PixelToValue(hitTest.PositionRelativeToPlotArea.X);double Y = yAxis.PixelToValue(hitTest.PositionRelativeToPlotArea.Y); return new NumberDataPoint(X, Y);But the above does not work for Mouse up event (values of X Y are just stupid). Any idea how I can get those values? Quote Link to comment Share on other sites More sharing options...
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.