Table of Contents

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

value double

The Y-axis value where the line is drawn.

color Color

The color of the line.

lineChar char

The character used to draw the line.

label string

Optional label text.

labelPosition LabelPosition

Position of the label relative to the line.

Properties

Color

Gets the color of the reference line.

public Color Color { get; }

Property Value

Color

Label

Gets the optional label text displayed alongside the reference line.

public string? Label { get; }

Property Value

string

LabelPosition

Gets the position of the label relative to the reference line.

public LabelPosition LabelPosition { get; }

Property Value

LabelPosition

LineChar

Gets the character used to draw the reference line.

public char LineChar { get; }

Property Value

char

Value

Gets the Y-axis value where this reference line is drawn.

public double Value { get; }

Property Value

double