Class BarSeries
Series of bars positioned at regular intervals
Inheritance
System.Object
BarSeries
Implements
Namespace: Terminal.Gui.Graphs
Assembly: Terminal.Gui.dll
Syntax
public class BarSeries : Object, ISeries
Constructors
BarSeries()
Declaration
public BarSeries()
Properties
BarEvery
Determines the spacing of bars along the axis. Defaults to 1 i.e.
every 1 unit of graph space a bar is rendered. Note that you should
also consider CellSize when changing this.
Declaration
public float BarEvery { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Bars
Ordered collection of graph bars to position along axis
Declaration
public List<BarSeries.Bar> Bars { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<BarSeries.Bar> |
DrawLabels
True to draw Text along the axis under the bar. Defaults
to true.
Declaration
public bool DrawLabels { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Offset
The number of units of graph space along the axis before rendering the first bar
(and subsequent bars - see BarEvery). Defaults to 0
Declaration
public float Offset { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Orientation
Direction bars protrude from the corresponding axis.
Defaults to vertical
Declaration
public Orientation Orientation { get; set; }
Property Value
Type | Description |
---|---|
Orientation |
OverrideBarColor
Overrides the Fill with a fixed color
Declaration
public Nullable<Attribute> OverrideBarColor { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<Attribute> |
Methods
AdjustColor(GraphCellToRender)
Applies any color overriding
Declaration
protected virtual GraphCellToRender AdjustColor(GraphCellToRender graphCellToRender)
Parameters
Type | Name | Description |
---|---|---|
GraphCellToRender | graphCellToRender |
Returns
Type | Description |
---|---|
GraphCellToRender |
DrawBarLine(GraphView, Point, Point, BarSeries.Bar)
Override to do custom drawing of the bar e.g. to apply varying color or changing the fill
symbol mid bar.
Declaration
protected virtual void DrawBarLine(GraphView graph, Point start, Point end, BarSeries.Bar beingDrawn)
Parameters
Type | Name | Description |
---|---|---|
GraphView | graph | |
Point | start | Screen position of the start of the bar |
Point | end | Screen position of the end of the bar |
BarSeries.Bar | beingDrawn | The Bar that occupies this space and is being drawn |
DrawSeries(GraphView, Rect, RectangleF)
Draws bars that are currently in the
drawBounds
Declaration
public virtual void DrawSeries(GraphView graph, Rect drawBounds, RectangleF graphBounds)
Parameters
Type | Name | Description |
---|---|---|
GraphView | graph | |
Rect | drawBounds | Screen area of the graph excluding margins |
RectangleF | graphBounds | Graph space area that should be drawn into drawBounds |