Bober02 Posted July 26, 2010 Report Share Posted July 26, 2010 I included the fillowing code to draw crosshair on each mouse move: HitTestResults hitTest = chart1.HitTest(e.GetPosition(chart1)); if (!hitTest.IsInsidePlotArea) return;Axis axisX = chart1.AxisX; Axis axisY = chart1.AxisY;var _x = axisX.PixelToValue(hitTest.PositionRelativeToPlotArea.X); _y = axisY.PixelToValue(hitTest.PositionRelativeToPlotArea.Y); if (_x is decimal) X.Text = _x.ToString(); elseX.Text = _x.ToString();Y.Text = _y.ToString("0.00");FrameworkElement parent = lineH.Parent as FrameworkElement; lineH.Y1 = e.GetPosition(parent).Y; lineH.Y2 = e.GetPosition(parent).Y; lineV.X1 = e.GetPosition(parent).X; lineV.X2 = e.GetPosition(parent).X; and I have two lines added to chart. Now, my tooltip won't show when I hover over point or line. Any idea how to fix this? 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.