LineSeriesCursor
Basic features
Line series cursors allow visual analysis of line series data by tracking the values by X coordinate. Series values are can only be resolved with series implementing ITrackable interface (SampleDataSeries, SampleDataBlockSeries, PointLineSeries, LiteLineSeries, DigitalLineSeries, AreaSeries, HighLowSeries). For other series types, Y coordinate is not automatically tracked by cursors.
Add LineSeriesCursor object into LineSeriesCursors collection. Set the cursor tracking style with Style property. When Style is set to PointTracking, any tracking point style can be used, even a bitmap image. When using HairCrossTracking style, a horizontal line is drawn at line series point Y value. If multiple points of same series hit in cursor location, line is drawn in the middle of minimum and maximum points.

Cursor on the left (cyan line and crosses), Style PointTracking, vertical point tracking cursor. Cursor in the center (red lines), Style HairCrossTracking, hair-cross tracking cursor (horizontal lines are same color as LineSeriesCursor itself). Cursor on the right (yellow line), Style VerticalNoTracking, vertical full-length cursor without tracking.
Enable SnapToPoints to jump the cursor from point to point. Note! When cursor.SnapToPoints is disabled, the SolveYValueAtXValue returns interpolated value between the points adjacent to it (the intersection of cursor line and the series line).
SolveYValueAtXValue interpolates the value between adjacent data points when SnapToPoints is disabled.
By enabling IndicateTrackingYRange a horizontal bar is drawn ranging from minimum to maximum of the points hitting in the middle of the cursor.
![]()
Hair-cross cursor with Y range indicator (IndicateTrackingYRange = true).
When Style = CursorStyle.HairCrossTracking and HairCrossColorMixing property is enabled, the horizontal (tracking) line color will be interpolated color between line-series color and cursor color. Note, color mixing is not applied for tracking points, those always remain same style.

Hair-cross cursor with color mixing (HairCrossColorMixing = true, also IndicateTrackingYRange = true).
To see feature demonstration as example, check ExampleTradingMultiSegment, ExamplePointLineSeriesXY, ExampleCursorTrackingXY, ExampleLogAxesXY from our Demo.
Cursor tracking per Series
Series has CursorTrackEnabled property, which controls whatever it is being tracked by DataCursor or LineSeriesCursor. User can disable this property if particular series tracking is not needed.
Advanced features
LineSeriesCursor has two advanced features, which allow more control over which series are tracked and how the tracking is done.
TrackLineSeries can be used to determine if the cursor should resolve and draw a track point for a series implementing ITrackable interface. TrackLineSeries is defined as a predicate. For example, the following tracks only series that are assigned to the first Y-axis.
cursor.TrackLineSeries = new Predicate<ITrackable>(TrackableSeriesSelection);
private bool TrackableSeriesSelection(ITrackable obj)
{
return (obj as SeriesBaseXY).AssignYAxisIndex == 0 || (bool)!checkBoxTrackLineSeries.IsChecked;
}
SolveYValue is a Func delegate type which can be used to override the cursor’s original Y-value solving and tracking method. Input parameter is a series implementing ITrackable interface, while the output is a LineSeriesCoordinateSolveResult struct. For instance, the following changes the cursor to track the maximum Y-value between two cursor lines.
cursor.SolveYValue = CustomYValueSolver;
private LineSeriesCoordinateSolveResult? CustomYValueSolver(ITrackable series)
{
PointLineSeries plSeries = series as PointLineSeries;
AxisX xAxis = _chart.ViewXY.XAxes[0];
int iYAxisIndex = plSeries.AssignYAxisIndex;
int iMinIndex = 0;
double dMaxY = double.MinValue;
// check (Max value) only in range between 2 cursors
double dMinX = _chart.ViewXY.LineSeriesCursors[0].ValueAtXAxis;
double dMaxX = _chart.ViewXY.LineSeriesCursors[1].ValueAtXAxis;
for (int i = 0; i < plSeries.PointCount; i++)
{
if (dMinX <= plSeries.Points[i].X && plSeries.Points[i].X <= dMaxX && plSeries.Points[i].Y > dMaxY)
{
iMinIndex = i;
dMaxY = plSeries.Points[i].Y;
}
}
float fNearestX = xAxis.ValueToCoord(plSeries.Points[iMinIndex].X, false);
float fCoordY = _chart.ViewXY.YAxes[iYAxisIndex].ValueToCoord(dMaxY, false);
return new LineSeriesCoordinateSolveResult()
{
NearestX = fNearestX,
CoordBottom = fCoordY,
CoordTop = fCoordY,
MinIndex = iMinIndex,
PointCount = 1,
SolveStatus = LineSeriesSolveStatus.OK
};
}
To see advance features demonstration as example, check ExampleCursorAdvancedFeatures from our Demo.