BarMark<T> Class
Draws a bar per row: a band of the x scale (a category), from the baseline to the y value. With a StackTransform, the bars of a category are stacked; with BarMark<T>.Group, they are side by side. Transposed coordinates make horizontal bars; polar coordinates make a rose (or radial bars, transposed).
public sealed class BarMark<T> : Mark<T>Type parameters
T- The type of the rows.
- Inheritance
Mark<T>BarMark<T>
Constructors
| Name | Description |
|---|---|
| BarMark(IEnumerable<T>, Func<T, object?>, Func<T, object?>) | Initializes a new instance of the BarMark<T> class. |
BarMark(IEnumerable<T>, Func<T, object?>, Func<T, object?>)
BarMark.csInitializes a new instance of the BarMark<T> class.
public BarMark(IEnumerable<T> data, Func<T, object?> x, Func<T, object?> y)Parameters
dataIEnumerable<T>- The rows.
xFunc<T, object?>- The channel of the category of the bar.
yFunc<T, object?>- The channel of the value of the bar.
Properties
| Name | Description |
|---|---|
| BarWidth | Gets or sets the width of a bar, as a fraction of its band (or of its share of the band, for grouped bars), centered in it. The default is 1. A narrower bar can sit in a wider one, as in bullet charts. |
| CornerRadius | Gets or sets the radius of the corners of the bars. The default is 0. |
| Group | Gets or sets the channel that divides each band into side-by-side bars (grouped bars), or null. |
| GroupPadding | Gets or sets the space between the bars of a group, as a fraction of their width. The default is 0.05. |
| Series | Gets or sets the channel of the series to stack, when it differs from Mark<T>.Fill. |
| X | Gets the channel of the category of the bar. |
| Y | Gets the channel of the value of the bar. |
BarWidth
BarMark.csGets or sets the width of a bar, as a fraction of its band (or of its share of the band, for grouped bars), centered in it. The default is 1. A narrower bar can sit in a wider one, as in bullet charts.
public double BarWidth { get; set; }CornerRadius
BarMark.csGroup
BarMark.csGets or sets the channel that divides each band into side-by-side bars (grouped bars), or null.
Property value
GroupPadding
BarMark.csSeries
BarMark.csGets or sets the channel of the series to stack, when it differs from Mark<T>.Fill.
Property value
Gets the channel of the category of the bar.
Property value
Gets the channel of the value of the bar.