Skip to content

}},ScottPlot.LinePattern,System.String,System.Int32,System.String,System.String)}

AxisLinesUI(WpfPlot, IObservable<(string? Name, double? Position)>, LinePattern, string, int, string, string) constructor

Defined in

Type: AxisLinesUI 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

Overloads

  • 1. public AxisLinesUI(WpfPlot plot, IObservable<(string? Name, double? Position)> observable, LinePattern linePattern, string orientation = "Horizontal", int axis = 0, string color = "Blue", string text = "---")
  • 2. public AxisLinesUI(WpfPlot plot, double position, in LinePattern linePattern, string type = "Horizontal", int axis = 0, string color = "Blue", string text = "---")

1. Overload

public AxisLinesUI(WpfPlot plot, IObservable<(string? Name, double? Position)> observable, LinePattern linePattern, string orientation = "Horizontal", int axis = 0, string color = "Blue", string text = "---")

View source

Summary: Initializes a new instance of the AxisLinesUI class, configuring axis lines on the specified plot with. customizable orientation, appearance, and label text. Subscribes to an observable to update the axis line's position and name dynamically.

Parameters

NameTypeDescription
plotWpfPlotThe WpfPlot control on which the axis lines will be rendered.
observableIObservable<(string? Name, double? Position)>An observable sequence that provides updates for the axis line's name and position. Each tuple contains an optional name and an optional position value.
linePatternLinePatternThe line pattern to use for rendering the axis line, such as solid or dashed.
orientation = "Horizontal"stringThe orientation of the axis line. Specify "Horizontal" or "Vertical". Defaults to "Horizontal".
axis = 0intThe index of the axis to which the line is associated. Defaults to 0.
color = "Blue"stringThe color of the axis line. Specify a color name or value. Defaults to "Blue".
text = "---"stringThe label text to display alongside the axis line. Defaults to "---".

Remarks

If the orientation is set to "Horizontal", a horizontal axis line is created; if set to "Vertical", a vertical axis line is created. The observable parameter allows the axis line's position and name to be updated in real time as new values are emitted. This constructor is intended for use in interactive or dynamic plotting scenarios where axis lines need to reflect changing data.

2. Overload

public AxisLinesUI(WpfPlot plot, double position, in LinePattern linePattern, string type = "Horizontal", int axis = 0, string color = "Blue", string text = "---")

View source

Summary: Initializes a new instance of the AxisLinesUI class, adding a horizontal or vertical axis line to the specified. plot at the given position with customizable appearance and label.

Parameters

NameTypeDescription
plotWpfPlotThe WpfPlot control to which the axis line will be added. Cannot be null.
positiondoubleThe position, in plot coordinates, where the axis line will be drawn.
in linePatternLinePatternThe line pattern to apply to the axis line, such as solid or dashed.
type = "Horizontal"stringThe orientation of the axis line. Specify "Horizontal" to create a horizontal line or "Vertical" for a vertical line. Defaults to "Horizontal".
axis = 0intThe index of the axis to which the line is associated. Defaults to 0.
color = "Blue"stringThe color of the axis line. Specify a color name or value. Defaults to "Blue".
text = "---"stringThe label text to display with the axis line. Defaults to "---".

Remarks

If the type parameter is set to "Horizontal", a horizontal axis line is created; if set to "Vertical", a vertical axis line is created. The appearance and label of the line can be customized using the provided parameters.