Class ReferenceLine
- Namespace
- SharpConsoleUI.Controls
- Assembly
- SharpConsoleUI.dll
Represents a horizontal reference line drawn at a fixed Y-axis value across the graph area. Used to indicate thresholds, targets, or other significant values.
public class ReferenceLine
- Inheritance
-
ReferenceLine
- Inherited Members
- Extension Methods
Constructors
ReferenceLine(double, Color, char, string?, LabelPosition)
Creates a new reference line at the specified value.
public ReferenceLine(double value, Color color, char lineChar = '─', string? label = null, LabelPosition labelPosition = LabelPosition.None)
Parameters
valuedoubleThe Y-axis value where the line is drawn.
colorColorThe color of the line.
lineCharcharThe character used to draw the line.
labelstringOptional label text.
labelPositionLabelPositionPosition of the label relative to the line.
Properties
Color
Gets the color of the reference line.
public Color Color { get; }
Property Value
Label
Gets the optional label text displayed alongside the reference line.
public string? Label { get; }
Property Value
LabelPosition
Gets the position of the label relative to the reference line.
public LabelPosition LabelPosition { get; }
Property Value
LineChar
Gets the character used to draw the reference line.
public char LineChar { get; }
Property Value
Value
Gets the Y-axis value where this reference line is drawn.
public double Value { get; }