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
| Name | Description |
|---|---|
| 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.csInitializes 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
dataIEnumerable<T>- The rows.
textFunc<T, string?>- The channel of the text.
xFunc<T, object?>?- The channel of the x position, or
nullfor the middle of the plot area. yFunc<T, object?>?- The channel of the y position, or
nullfor the middle of the plot area.
Properties
| Name | Description |
|---|---|
| Anchor | Gets or sets where the text is anchored horizontally. The default is SceneTextAnchor.Middle. |
| Bold | Gets or sets a value that indicates whether the text is bold. |
| FontSize | Gets or sets the size of the font, or null for the size of the labels of the theme. |
| OffsetX | Gets or sets the horizontal offset of the text, in pixels. |
| OffsetY | Gets or sets the vertical offset of the text, in pixels: a negative value moves it up. |
| Rotation | Gets or sets the rotation of the text in degrees, clockwise. |
| Text | Gets the channel of the text. |
| X | Gets the channel of the x position. |
| Y | Gets the channel of the y position. |
Anchor
TextMark.csGets or sets where the text is anchored horizontally. The default is SceneTextAnchor.Middle.
public SceneTextAnchor Anchor { get; set; }Property value
Bold
TextMark.csFontSize
TextMark.csOffsetX
TextMark.csOffsetY
TextMark.csRotation
TextMark.csText
TextMark.csGets the channel of the x position.
Property value
Gets the channel of the y position.