$ rezi
Widgets

Line Chart

Multi-series line chart rendered through the graphics drawlist pipeline.

Multi-series line chart rendered through the graphics drawlist pipeline.

Usage

ui.lineChart({
  width: 30,
  height: 10,
  series: [
    { label: "CPU", color: "#4ecdc4", data: [20, 40, 35, 55, 48] },
    { label: "MEM", color: "#ff6b6b", data: [60, 58, 62, 67, 65] },
  ],
  showLegend: true,
})

Props

PropTypeDefaultDescription
widthnumberrequiredWidth in terminal columns
heightnumberrequiredHeight in terminal rows
series{ data: number[]; color: string; label?: string }[]requiredSeries definitions
axes{ x?: ChartAxis; y?: ChartAxis }auto rangeOptional axis bounds/labels
showLegendbooleantrue when multiple series, else falseDraw series labels below chart
blitter"braille" | "sextant" | "quadrant" | "halfblock" | "auto""braille"Sub-cell renderer
idstring-Optional widget id
keystring-Reconciliation key

Notes

  • Non-finite points are skipped/clamped by range resolution.
  • Unsupported builders render a placeholder instead of graphics commands.

On this page