Class
DataBarPresenter
ConsoleMonster.Presenters
A number with a data bar in the cell, scaled to DataBarPresenter.Maximum or the column maximum: ▆▆▆▆▆▆▆ 412. The number stays visible, so the cell reads the same without colour.
Inheritance
- object
- DataBarPresenter
Constructors
public DataBarPresenter(double? maximum = null, ICellPresenter? number = null, int barWidth = 10) #Creates a data bar presenter.
Parameters
- maximum double? = null
- The value of a full bar, or null for the column maximum.
- number ConsoleMonster.Presenters.ICellPresenter? = null
- How the number is formatted (default NumberPresenter).
- barWidth int = 10
- Cells the bar would like (default 10).
Methods
public PresentedValue Present(object? value, PresenterContext context) #Presents a value.
Parameters
- value object?
- The raw value (may be null).
- context ConsoleMonster.Presenters.PresenterContext
- Culture, clock, time zone, column statistics and the render context.
Inherited Methods
Properties
public double? Maximum { get; } #The value of a full bar, or null for the column maximum.
public bool ShowRoleMarker { get; set; } #Whether a matching health role uses a symbol (default true) or its status word after the numeric value. Accessible mode keeps the symbol.
public int ValuePadding { get; set; } #Optional spaces before the value, keeping numeric labels aligned when role markers follow them.