Skip to content

LineChart

extends Element

Line chart with values sampled across the available width.

Properties

PropertyTypeDefaultDescription
datanumber[]|falsefalseValues rendered as a line; initialized to a fresh table per instance
lineColornumbercolors.limeColor of the plotted line
minValuenumber0Lower bound of the value axis
maxValuenumber100Upper bound of the value axis
backgroundnumber|falsecolors.blackBackground color (false = transparent)
widthnumber20Width in terminal cells
heightnumber8Height in terminal cells

Methods

LineChart:setup()

Initializes per-instance state and input handlers.

LineChart:render(buf)

Renders the element into the buffer.

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

Last updated:

Released under the MIT License.