$ rezi
Widgets

Scatter

Scatter plot widget rendered through the graphics canvas pipeline.

Scatter plot widget rendered through the graphics canvas pipeline.

Usage

ui.scatter({
  width: 40,
  height: 12,
  points: [
    { x: 1, y: 2, color: "#4ecdc4" },
    { x: 3, y: 4 },
    { x: 8, y: 1, color: "#ff6b6b" },
  ],
  color: "#a0aec0",
})

Props

PropTypeDefaultDescription
widthnumberrequiredWidth in terminal columns
heightnumberrequiredHeight in terminal rows
points{ x: number; y: number; color?: string }[]requiredData points
axes{ x?: { min?: number; max?: number; label?: string }; y?: { min?: number; max?: number; label?: string } }auto rangeOptional axis bounds
colorstringtheme primaryDefault point color
blitter"auto" | "braille" | "sextant" | "quadrant" | "halfblock""auto"Sub-cell renderer
idstring-Optional widget id
keystring-Reconciliation key

Notes

  • Axis range is auto-derived from point data unless explicit bounds are provided.
  • Unsupported graphics builders render a placeholder box instead of raw bytes.

On this page