Skip to content

,System.String,System.Boolean,System.Boolean,System.Boolean,System.IObservable{ScottPlot.Coordinates>

Defined in

Type: Crosshair_UI Namespace: CrissCross.WPF.Plot Assembly: CrissCross.WPF.Plot.dll

Applies to

net10.0-windows10.0.19041, net9.0-windows10.0.19041, net8.0-windows10.0.19041, net481

public Crosshair_UI(WpfPlot plot, (string? Name, int Axis) data, string color, bool isXAxisDateTime = false, bool autoscale = true, bool manualscale = false, IObservable<Coordinates>? coordinatesObs = null)

View source

Summary: Initializes a new instance of the Crosshair_UI class, configuring crosshair display and marker behavior for the. specified plot with customizable appearance and scaling options.

Parameters

NameTypeDescription
plotWpfPlotThe WpfPlot instance to which the crosshair and marker will be attached.
data(string? Name, int Axis)A tuple containing the name and axis index for the data series associated with the crosshair.
colorstringThe color used for the crosshair and marker appearance.
isXAxisDateTime = falseboolIndicates whether the X axis represents DateTime values. If true, X axis values will be formatted as time strings.
autoscale = trueboolSpecifies whether the plot should automatically scale to fit the crosshair and marker. Set to true to enable autoscaling.
manualscale = falseboolSpecifies whether manual scaling is enabled for the crosshair and marker. Set to true to allow manual adjustment.
coordinatesObs = nullIObservable?An optional observable sequence of Coordinates used to update the crosshair position and marker label in response to mouse movement. If null, the crosshair is initialized without dynamic updates.

Remarks

If coordinatesObs is provided, the crosshair and marker label will update dynamically as new coordinates are received. When isXAxisDateTime is true, X axis values are displayed as formatted time strings. Autoscale and manualscale options control how the plot view responds to crosshair changes.