Custom trackers

The 'tracker' is shown when you press down the left mouse button over some data in the plot.
By default the tracker shows the values of the current point.


The easiest way to modify the information shown in the tracker, is to modify the TrackerFormatString of the series.
under construction

The WPF/Silverlight Plot controls contain a dependency property DefaultTrackerTemplate where a custom ControlTemplate can be defined.
When the tracker is shown, the DataContext will be set to a TrackerHitResult. You can bind Position and data properties from the hit results.

The WPF and Silverlight projects contain a TrackerControl that can be used in tracker templates.
You should bind the Position, LineExtents and Content properties to data in the TrackerHitResult.

This class contains data about the current hit of the tracker:

Position the XY screen coordinates of the tracker.
DataPoint the data point if the tracker shows an item from a DataPointSeries.
Series the current series.
PlotModel the current plot model.
LineExtents the rectangle that should be used to draw the horizontal and vertical lines.
XAxis the current x axis.
YAxis the current y axis.
Item the current item if an ItemsSource was used to generate the data.
Text the text to be shown in the tracker. If this property is set, the series' TrackerFormatString will not be used.

If you want to specify different trackers for the series, you should define TrackerDefinitions in the Plot control.
Set the TrackerKey of the series to select which TrackerDefinition to use.

See the Examples/WPF/CustomTrackerDemo application for examples on how to make custom trackers.

Last edited Aug 15, 2011 at 6:47 AM by objo, version 4


sgtKK Mar 17, 2015 at 4:40 PM 
This might help:
<oxy:Plot x:Name="oxyPlot" Model="{Binding OxyPlotModel}" >
<oxy:TrackerControl Position="{Binding Position}" LineExtents="{Binding PlotModel.PlotArea}">
<LinearGradientBrush EndPoint="0,1">
<GradientStop Color="#ff009fda" />
<GradientStop Offset="1" Color="#ff050505" />
<TextBlock Text="{Binding}" Margin="7" Foreground="White" />

Archer25 Apr 29, 2014 at 1:27 PM 
I can't finde Example "Custom trackers", who can give me link please.
Or who ken help.
I've scatter series, and i'm need for every points in series show unique identifier (5 string).
Hwo know how make it?