Jump to content
Software FX Community

Tooltip disappears upon drawing crosshair


Recommended Posts

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();


X.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?

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.

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.

  • Create New...