Table of Contents

Class ChartText

Namespace
TwBlazor.Charting
Assembly
TwBlazor.dll

A text label. Offsets and FontSize are in pixels. MaxWidth is a percentage of the plot's width; a label that would be wider is cut short with an ellipsis instead of spilling over its mark.

public sealed record ChartText : IChartMark, IEquatable<ChartText>
Inheritance
ChartText
Implements
Inherited Members

Constructors

ChartText(double, double, string, ChartAnchor, ChartBaseline, ChartTextTone, double, double, bool, bool, double?, double?)

A text label. Offsets and FontSize are in pixels. MaxWidth is a percentage of the plot's width; a label that would be wider is cut short with an ellipsis instead of spilling over its mark.

public ChartText(double X, double Y, string Text, ChartAnchor Anchor = ChartAnchor.Middle, ChartBaseline Baseline = ChartBaseline.Middle, ChartTextTone Tone = ChartTextTone.Muted, double OffsetX = 0, double OffsetY = 0, bool Strong = false, bool Large = false, double? FontSize = null, double? MaxWidth = null)

Parameters

X double
Y double
Text string
Anchor ChartAnchor
Baseline ChartBaseline
Tone ChartTextTone
OffsetX double
OffsetY double
Strong bool
Large bool
FontSize double?
MaxWidth double?

Properties

Anchor

public ChartAnchor Anchor { get; init; }

Property Value

ChartAnchor

Baseline

public ChartBaseline Baseline { get; init; }

Property Value

ChartBaseline

FontSize

public double? FontSize { get; init; }

Property Value

double?

Large

public bool Large { get; init; }

Property Value

bool

MaxWidth

public double? MaxWidth { get; init; }

Property Value

double?

OffsetX

public double OffsetX { get; init; }

Property Value

double

OffsetY

public double OffsetY { get; init; }

Property Value

double

Strong

public bool Strong { get; init; }

Property Value

bool

Text

public string Text { get; init; }

Property Value

string

Tone

public ChartTextTone Tone { get; init; }

Property Value

ChartTextTone

X

public double X { get; init; }

Property Value

double

Y

public double Y { get; init; }

Property Value

double

Methods

Deconstruct(out double, out double, out string, out ChartAnchor, out ChartBaseline, out ChartTextTone, out double, out double, out bool, out bool, out double?, out double?)

public void Deconstruct(out double X, out double Y, out string Text, out ChartAnchor Anchor, out ChartBaseline Baseline, out ChartTextTone Tone, out double OffsetX, out double OffsetY, out bool Strong, out bool Large, out double? FontSize, out double? MaxWidth)

Parameters

X double
Y double
Text string
Anchor ChartAnchor
Baseline ChartBaseline
Tone ChartTextTone
OffsetX double
OffsetY double
Strong bool
Large bool
FontSize double?
MaxWidth double?

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Equals(ChartText?)

public bool Equals(ChartText? other)

Parameters

other ChartText

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(ChartText?, ChartText?)

public static bool operator ==(ChartText? left, ChartText? right)

Parameters

left ChartText
right ChartText

Returns

bool

operator !=(ChartText?, ChartText?)

public static bool operator !=(ChartText? left, ChartText? right)

Parameters

left ChartText
right ChartText

Returns

bool