,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)
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
| Name | Type | Description |
|---|---|---|
plot | WpfPlot | The 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. |
color | string | The color used for the crosshair and marker appearance. |
isXAxisDateTime = false | bool | Indicates whether the X axis represents DateTime values. If true, X axis values will be formatted as time strings. |
autoscale = true | bool | Specifies whether the plot should automatically scale to fit the crosshair and marker. Set to true to enable autoscaling. |
manualscale = false | bool | Specifies whether manual scaling is enabled for the crosshair and marker. Set to true to allow manual adjustment. |
coordinatesObs = null | IObservable | 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.