Class BarChartBuilder
- Namespace
- MiniTui
- Assembly
- MiniTui.dll
Labelled bars, vertical (growing up) or horizontal (growing right), in eighths of a cell (1.x spec §8.5), or groups of them side by side or stacked, with a legend of their series (§19.3).
public sealed class BarChartBuilder
- Inheritance
-
BarChartBuilder
- Inherited Members
Methods
BarGap(int)
The cells (or rows) between bars. Default 1.
public BarChartBuilder BarGap(int gap)
Parameters
gapint
Returns
BarWidth(int)
The width of a vertical bar in cells. Default 3.
public BarChartBuilder BarWidth(int width)
Parameters
widthint
Returns
Bars(params Bar[])
The bars, left to right (or top to bottom).
public BarChartBuilder Bars(params Bar[] bars)
Parameters
barsBar[]
Returns
Bars(IReadOnlyList<Bar>)
The bars, left to right (or top to bottom).
public BarChartBuilder Bars(IReadOnlyList<Bar> bars)
Parameters
barsIReadOnlyList<Bar>
Returns
Block(BlockBuilder)
Draw a block around the chart.
public BarChartBuilder Block(BlockBuilder block)
Parameters
blockBlockBuilder
Returns
Direction(Direction)
Vertical bars grow up; horizontal ones grow right. Default Vertical.
public BarChartBuilder Direction(Direction direction)
Parameters
directionDirection
Returns
Draw(Buffer, Rect)
Draw the chart.
public void Draw(Buffer buf, Rect area)
Parameters
GroupGap(int)
The cells (or rows) between groups drawn side by side. Default 2.
public BarChartBuilder GroupGap(int gap)
Parameters
gapint
Returns
Groups(params BarGroup[])
Draw groups of bars instead (1.x spec §19.3): side by side with GroupGap(int) between groups, or one stacked bar per group with Stacked(bool). A bar without a style takes ChartSeries by its index in the group.
public BarChartBuilder Groups(params BarGroup[] groups)
Parameters
groupsBarGroup[]
Returns
Groups(IReadOnlyList<BarGroup>)
Draw groups of bars instead (1.x spec §19.3): side by side with GroupGap(int) between groups, or one stacked bar per group with Stacked(bool). A bar without a style takes ChartSeries by its index in the group.
public BarChartBuilder Groups(IReadOnlyList<BarGroup> groups)
Parameters
groupsIReadOnlyList<BarGroup>
Returns
Legend(LegendPosition)
Where the legend of the groups' series goes. Default TopRight.
public BarChartBuilder Legend(LegendPosition position)
Parameters
positionLegendPosition
Returns
Max(double?)
The value of a full bar. By default, the largest value.
public BarChartBuilder Max(double? max)
Parameters
maxdouble?
Returns
Stacked(bool)
Stack each group's bars into one bar, bottom up (left to right), instead of side by side. Off by default.
public BarChartBuilder Stacked(bool stacked = true)
Parameters
stackedbool
Returns
Style(Style)
A style patched over the theme's text style, for the labels and values.
public BarChartBuilder Style(Style style)
Parameters
styleStyle
Returns
ValueFormat(string)
The .NET numeric format of the values, in the invariant culture. Default "0.##".
public BarChartBuilder ValueFormat(string format)
Parameters
formatstring