AnnotationMark<T> Class

Draws an annotation per row: a text placed at an offset from a point of the chart, and an arrow from the text to the point. The text is anchored on the side of the offset, so it stays clear of the point; a line break starts a new line.

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

Type parameters

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

Constructors

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

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

AnnotationMark.cs

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

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

Parameters

data IEnumerable<T>
The rows: the annotations.
x Func<T, object?>
The channel of the x position of the point.
y Func<T, object?>
The channel of the y position of the point.
text Func<T, string?>
The channel of the text.

Properties

NameDescription
BendGets or sets the angle of the curve of the arrow, in degrees: 0 for a straight arrow, positive values bend it clockwise. The default is 0.
DXGets or sets the horizontal offset of the text from the point, in pixels. The default is 40.
DYGets or sets the vertical offset of the text from the point, in pixels: negative values are above it. The default is -30.
FontSizeGets or sets the font size of the text, or null for the font size of the theme.
HeadSizeGets or sets the size of the head of the arrow, in pixels, or 0 for a line without a head. The default is 6.
TextGets the channel of the text.
XGets the channel of the x position of the point.
YGets the channel of the y position of the point.

Gets or sets the angle of the curve of the arrow, in degrees: 0 for a straight arrow, positive values bend it clockwise. The default is 0.

public double Bend { get; set; }

Property value

double

Gets or sets the horizontal offset of the text from the point, in pixels. The default is 40.

public double DX { get; set; }

Property value

double

Gets or sets the vertical offset of the text from the point, in pixels: negative values are above it. The default is -30.

public double DY { get; set; }

Property value

double

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

public double? FontSize { get; set; }

Property value

double?

Gets or sets the size of the head of the arrow, in pixels, or 0 for a line without a head. The default is 6.

public double HeadSize { 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 of the point.

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

Property value

Func<T, object?>

Gets the channel of the y position of the point.

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

Property value

Func<T, object?>