$ rezi
Widgets

Sparkline

Tiny inline chart for showing trends.

Tiny inline chart for showing trends.

Usage

ui.sparkline(state.series, { width: 24, min: 0, max: 100 })

Props

PropTypeDefaultDescription
datanumber[]requiredRaw numeric data points
widthnumberdata.lengthWidth in cells
minnumberauto (Math.min(...data))Minimum value for scaling
maxnumberauto (Math.max(...data))Maximum value for scaling
highResbooleanfalseRender with graphics drawlists when supported
blitter"braille" | "sextant" | "quadrant" | "halfblock""braille"Sub-cell renderer used in highRes mode
styleTextStyle-Optional style override

Notes

  • Values are normalized internally using (value - min) / (max - min).
  • Use min/max to pin the scale when comparing multiple sparklines.
  • For multi-series data, render multiple sparklines in a row.
  • highRes automatically falls back to text rendering on non-graphics builders.

On this page