Skip to content
ConsoleMonster

API Reference

Class

DataBarPresenter

Namespace ConsoleMonster.Presenters
Assembly ConsoleMonster
Implements
Modifiers sealed

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, Int32 barWidth = 10) #

Creates a data bar presenter.

Parameters

maximum System.Double? = null optionalposition: 0
The value of a full bar, or null for the column maximum.
number ConsoleMonster.Presenters.ICellPresenter? = null optionalposition: 1
How the number is formatted (default NumberPresenter).
barWidth System.Int32 = 10 optionalposition: 2
Cells the bar would like (default 10).

Methods

public PresentedValue Present(Object? value, PresenterContext context) #
Returns: PresentedValue

Presents a value.

Parameters

value System.Object? requiredposition: 0
The raw value (may be null).
context ConsoleMonster.Presenters.PresenterContext requiredposition: 1
Culture, clock, time zone, column statistics and the render context.

Returns

The presented value.

Properties

public Double? Maximum { get; } #

The value of a full bar, or null for the column maximum.

public ICellPresenter NumberFormat { get; } #

How the number is formatted.

public Int32 BarWidth { get; } #

Cells the bar would like.