Always displaying the tracker

Jun 26, 2012 at 3:57 PM

I am interested in showing the tracker all the time, not just after a left mouse click when over a graphed item. Can this be added? If not can you point me in the right direction for the best way to implement this feature?


Jun 27, 2012 at 12:51 PM

I added this in the issue tracker. See work item 9963!

Currently the tracker is 'following' the series that was nearest at the mouse down point. When it is shown all the time, it needs to 'jump' to the nearest series.

Implementation: I think both the Plot control class and the TrackerManipulator class must be changed. The tracker's Completed method should not hide tracker and not reset the 'current' series. I can look into this later.

Jul 19, 2012 at 9:15 AM

A hopefully smaller question, but very related.

What would be the best way to show a persistent line in the plot after clicking the graph? This line should be similar to one of the lines in the cross shown from the tracker when the plot is clicked. Just to indicate the clicked value on one of the axes.

Thanks in advance!

Aug 8, 2012 at 9:51 PM

Add an 'annotation'. Try to add a LineAnnotation to the Annotations collection of the PlotModel!

Aug 4, 2014 at 5:55 PM
Edited Aug 4, 2014 at 6:47 PM
A lineAnnotation doesn't work well for WPF.
In MouseEventExample -> Select range, I added a line annotation that always following the mouse, but PlotView cannot fire mouse events.
How come the annotation blocked mouse event from firing?
Note: WinForm works fine.
var cursor = new LineAnnotation()
    Type = LineAnnotationType.Vertical,
    Color = OxyColors.Green,
    ClipByYAxis = false,
model.MouseMove += (s, e) =>
cursor.X = cursor.InverseTransform(e.Position).X;
    if (!double.IsNaN(startx))
        var x = range.InverseTransform(e.Position).X;
        range.MinimumX = Math.Min(x, startx);
        range.MaximumX = Math.Max(x, startx);
        range.Text = string.Format("∫ cos(x) dx =  {0:0.00}", Math.Sin(range.MaximumX) - Math.Sin(range.MinimumX));
        model.Subtitle = string.Format("Integrating from {0:0.00} to {1:0.00}", range.MinimumX, range.MaximumX);
        e.Handled = true;