Skip to content

BarChart ​

extends Element

Bar chart with one vertical bar per value in data.

Properties ​

PropertyTypeDefaultDescription
datanumber[]|falsefalseValues rendered as bars; initialized to a fresh table per instance
barColornumbercolors.limeColor of the bar/track
minValuenumber0Lower bound of the value axis
maxValuenumber|falsefalsefalse = auto (data maximum)
backgroundnumber|falsecolors.blackBackground color (false = transparent)
widthnumber20Width in terminal cells
heightnumber8Height in terminal cells

Methods ​

BarChart:setup() ​

Initializes per-instance state and input handlers.

BarChart:render(buf) ​

Renders the element into the buffer.

  • buf (Render) The render buffer (local coordinates, pre-clipped)

Last updated:

Released under the MIT License.