RectMark<T> Class

Draws a rectangle per row. On each axis, the rectangle covers the band of a category (RectMark<T>.X, RectMark<T>.Y), the interval between two values (RectMark<T>.X1 and RectMark<T>.X2, RectMark<T>.Y1 and RectMark<T>.Y2), or the whole plot area when no channel is set. Two band axes and a numeric fill make a heatmap; a BinTransform on x makes a histogram.

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

Type parameters

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

Constructors

NameDescription
RectMark(IEnumerable<T>)Initializes a new instance of the RectMark<T> class.

RectMark(IEnumerable<T>)

RectMark.cs

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

public RectMark(IEnumerable<T> data)

Parameters

data IEnumerable<T>
The rows.

Properties

NameDescription
CornerRadiusGets or sets the radius of the corners. The default is 0.
InsetGets or sets the space between adjacent rectangles, in pixels. The default is 1.
TextGets or sets the channel of a label drawn in the middle of the rectangle when it fits.
XGets or sets the channel of the category on the x axis (a band), or of the values to bin.
X1Gets or sets the channel of the start of the rectangle on the x axis.
X2Gets or sets the channel of the end of the rectangle on the x axis.
YGets or sets the channel of the category on the y axis (a band).
Y1Gets or sets the channel of the start of the rectangle on the y axis.
Y2Gets or sets the channel of the end of the rectangle on the y axis. Without RectMark<T>.Y1, the rectangle starts at the baseline.

CornerRadius

RectMark.cs

Gets or sets the radius of the corners. The default is 0.

public double CornerRadius { get; set; }

Property value

double

Gets or sets the space between adjacent rectangles, in pixels. The default is 1.

public double Inset { get; set; }

Property value

double

Gets or sets the channel of a label drawn in the middle of the rectangle when it fits.

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

Property value

Func<T, string?>?

Gets or sets the channel of the category on the x axis (a band), or of the values to bin.

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

Property value

Func<T, object?>?

Gets or sets the channel of the start of the rectangle on the x axis.

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

Property value

Func<T, object?>?

Gets or sets the channel of the end of the rectangle on the x axis.

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

Property value

Func<T, object?>?

Gets or sets the channel of the category on the y axis (a band).

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

Property value

Func<T, object?>?

Gets or sets the channel of the start of the rectangle on the y axis.

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

Property value

Func<T, object?>?

Gets or sets the channel of the end of the rectangle on the y axis. Without RectMark<T>.Y1, the rectangle starts at the baseline.

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

Property value

Func<T, object?>?