Mark<T> Class

A mark that draws a sequence of rows of type T, one shape (or one point of a line) per row.

public abstract class Mark<T> : Mark

Type parameters

T
The type of the rows.

Remarks

A channel is a function of a row. It returns a number (any numeric type), a time (DateTime, DateTimeOffset, DateOnly) or a category (strings and anything else, formatted with the invariant culture). null and Double.NaN are missing values: the row is not drawn, and lines break around it.

Inheritance
Mark Mark<T>

Properties

NameDescription
DataGets the rows of the mark.
DataAttributesGets or sets the channel of the data-* attributes of the shape of each row in the SVG output, or null for none. The names are without the data- prefix: lowercase ASCII letters, digits, hyphens, underscores and dots. The values are formatted with the invariant culture: numbers round-trip, times use ISO 8601, and null skips the attribute. Scripts of a web page read them with element.dataset. The shapes that draw several rows (the line of a series, a box plot...) get the attributes of their first row, and the shapes that count rows (the bars of a histogram) get none.
FacetXGets or sets the channel of the column of the facet grid of each row, or null. With facets, the plot is a grid of small charts (small multiples) that share the scales; each row is drawn in the chart of its facet. A mark without facet channels is drawn in every chart, such as a reference line.
FacetYGets or sets the channel of the row of the facet grid of each row, or null. See Mark<T>.FacetX.
FillGets or sets the channel of the fill color, mapped by the color scale, or null to use Mark<T>.FillColor.
FillColorGets or sets the fill color when Mark<T>.Fill is not set, or null for the first color of the theme.
StrokeGets or sets the channel of the stroke color, mapped by the color scale, or null to use Mark<T>.StrokeColor.
StrokeColorGets or sets the stroke color when Mark<T>.Stroke is not set, or null for the default of the mark.
StrokeWidthGets or sets the stroke width, or null for the default of the mark.
TitleGets or sets the channel of the tooltips (an SVG title per shape), or null for none.
TransformGets or sets the transform applied to the rows before they are drawn (stack, bin, group...), or null for none.

Gets the rows of the mark.

public IEnumerable<T> Data { get; }

Property value

IEnumerable<T>

DataAttributes

Mark`1.cs

Gets or sets the channel of the data-* attributes of the shape of each row in the SVG output, or null for none. The names are without the data- prefix: lowercase ASCII letters, digits, hyphens, underscores and dots. The values are formatted with the invariant culture: numbers round-trip, times use ISO 8601, and null skips the attribute. Scripts of a web page read them with element.dataset. The shapes that draw several rows (the line of a series, a box plot...) get the attributes of their first row, and the shapes that count rows (the bars of a histogram) get none.

public Func<T, IEnumerable<KeyValuePair<string, object?>>?>? DataAttributes { get; set; }

FacetX

Mark`1.cs

Gets or sets the channel of the column of the facet grid of each row, or null. With facets, the plot is a grid of small charts (small multiples) that share the scales; each row is drawn in the chart of its facet. A mark without facet channels is drawn in every chart, such as a reference line.

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

Property value

Func<T, object?>?

FacetY

Mark`1.cs

Gets or sets the channel of the row of the facet grid of each row, or null. See Mark<T>.FacetX.

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

Property value

Func<T, object?>?

Gets or sets the channel of the fill color, mapped by the color scale, or null to use Mark<T>.FillColor.

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

Property value

Func<T, object?>?

FillColor

Mark`1.cs

Gets or sets the fill color when Mark<T>.Fill is not set, or null for the first color of the theme.

public ChartColor? FillColor { get; set; }

Property value

ChartColor?

Stroke

Mark`1.cs

Gets or sets the channel of the stroke color, mapped by the color scale, or null to use Mark<T>.StrokeColor.

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

Property value

Func<T, object?>?

StrokeColor

Mark`1.cs

Gets or sets the stroke color when Mark<T>.Stroke is not set, or null for the default of the mark.

public ChartColor? StrokeColor { get; set; }

Property value

ChartColor?

StrokeWidth

Mark`1.cs

Gets or sets the stroke width, or null for the default of the mark.

public double? StrokeWidth { get; set; }

Property value

double?

Gets or sets the channel of the tooltips (an SVG title per shape), or null for none.

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

Property value

Func<T, string?>?

Transform

Mark`1.cs

Gets or sets the transform applied to the rows before they are drawn (stack, bin, group...), or null for none.

public Transform? Transform { get; set; }

Property value

Transform?