TextMark<T> Class

Draws a text per row at its x and y positions. A position without a channel is the middle of the plot area (the center, in polar coordinates), which places a label in the middle of a donut or a gauge.

public sealed class TextMark<T> : Mark<T>

Type parameters

T
The type of the rows.
Inheritance
Mark<T> TextMark<T>

Constructors

NameDescription
TextMark(IEnumerable<T>, Func<T, string?>, Func<T, object?>?, Func<T, object?>?)Initializes a new instance of the TextMark<T> class.

TextMark(IEnumerable<T>, Func<T, string?>, Func<T, object?>?, Func<T, object?>?)

TextMark.cs

Initializes a new instance of the TextMark<T> class.

public TextMark(IEnumerable<T> data, Func<T, string?> text, Func<T, object?>? x = null, Func<T, object?>? y = null)

Parameters

data IEnumerable<T>
The rows.
text Func<T, string?>
The channel of the text.
x Func<T, object?>?
The channel of the x position, or null for the middle of the plot area.
y Func<T, object?>?
The channel of the y position, or null for the middle of the plot area.

Properties

NameDescription
AnchorGets or sets where the text is anchored horizontally. The default is SceneTextAnchor.Middle.
BoldGets or sets a value that indicates whether the text is bold.
FontSizeGets or sets the size of the font, or null for the size of the labels of the theme.
OffsetXGets or sets the horizontal offset of the text, in pixels.
OffsetYGets or sets the vertical offset of the text, in pixels: a negative value moves it up.
RotationGets or sets the rotation of the text in degrees, clockwise.
TextGets the channel of the text.
XGets the channel of the x position.
YGets the channel of the y position.

Gets or sets where the text is anchored horizontally. The default is SceneTextAnchor.Middle.

public SceneTextAnchor Anchor { get; set; }

Property value

SceneTextAnchor

Gets or sets a value that indicates whether the text is bold.

public bool Bold { get; set; }

Property value

bool

FontSize

TextMark.cs

Gets or sets the size of the font, or null for the size of the labels of the theme.

public double? FontSize { get; set; }

Property value

double?

Gets or sets the horizontal offset of the text, in pixels.

public double OffsetX { get; set; }

Property value

double

Gets or sets the vertical offset of the text, in pixels: a negative value moves it up.

public double OffsetY { get; set; }

Property value

double

Rotation

TextMark.cs

Gets or sets the rotation of the text in degrees, clockwise.

public double Rotation { get; set; }

Property value

double

Gets the channel of the text.

public Func<T, string?> Text { get; }

Property value

Func<T, string?>

Gets the channel of the x position.

public Func<T, object?>? X { get; }

Property value

Func<T, object?>?

Gets the channel of the y position.

public Func<T, object?>? Y { get; }

Property value

Func<T, object?>?