Class ChartText
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
XdoubleYdoubleTextstringAnchorChartAnchorBaselineChartBaselineToneChartTextToneOffsetXdoubleOffsetYdoubleStrongboolLargeboolFontSizedouble?MaxWidthdouble?
Properties
Anchor
public ChartAnchor Anchor { get; init; }
Property Value
Baseline
public ChartBaseline Baseline { get; init; }
Property Value
FontSize
public double? FontSize { get; init; }
Property Value
Large
public bool Large { get; init; }
Property Value
MaxWidth
public double? MaxWidth { get; init; }
Property Value
OffsetX
public double OffsetX { get; init; }
Property Value
OffsetY
public double OffsetY { get; init; }
Property Value
Strong
public bool Strong { get; init; }
Property Value
Text
public string Text { get; init; }
Property Value
Tone
public ChartTextTone Tone { get; init; }
Property Value
X
public double X { get; init; }
Property Value
Y
public double Y { get; init; }
Property Value
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
XdoubleYdoubleTextstringAnchorChartAnchorBaselineChartBaselineToneChartTextToneOffsetXdoubleOffsetYdoubleStrongboolLargeboolFontSizedouble?MaxWidthdouble?
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
Equals(ChartText?)
public bool Equals(ChartText? other)
Parameters
otherChartText
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(ChartText?, ChartText?)
public static bool operator ==(ChartText? left, ChartText? right)
Parameters
Returns
operator !=(ChartText?, ChartText?)
public static bool operator !=(ChartText? left, ChartText? right)