$ rezi
Widgets

BarChart

Bar chart widget for categorical data.

Bar chart widget for categorical data.

Usage

ui.barChart([
  { label: "A", value: 12 },
  { label: "B", value: 5 },
  { label: "C", value: 18 },
], { orientation: "horizontal", showValues: true })

Props

PropTypeDefaultDescription
data{ label: string; value: number; variant?: BadgeVariant }[]requiredData items to render
orientation"horizontal" | "vertical""horizontal"Chart orientation
showValuesbooleantrueRender numeric values
showLabelsbooleantrueRender labels
maxBarLengthnumberautoMax bar length in cells
highResbooleanfalseRender bars via graphics drawlists when supported
blitter"braille" | "sextant" | "quadrant" | "halfblock""braille"Sub-cell renderer used in highRes mode
styleTextStyle-Optional style override

BadgeVariant values: "default", "success", "warning", "error", "info".

highRes mode is best for bar-only views (showLabels: false, showValues: false) and falls back to text rendering on non-graphics builders.

On this page