LineChart
extends Element
Line chart with values sampled across the available width.
Properties
| Property | Type | Default | Description |
|---|---|---|---|
| data | number[]|false | false | Values rendered as a line; initialized to a fresh table per instance |
| lineColor | number | colors.lime | Color of the plotted line |
| minValue | number | 0 | Lower bound of the value axis |
| maxValue | number | 100 | Upper bound of the value axis |
| background | number|false | colors.black | Background color (false = transparent) |
| width | number | 20 | Width in terminal cells |
| height | number | 8 | Height 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)