bloxa

Bar Chart

FREE

Grouped or stacked bars that grow in; the hovered column is highlighted.

Installation

Terminal
npx @bloxa/cli add bar-chart
# or: npx shadcn@latest add @bloxa/bar-chart

Packages installed automatically: motion

Examples

Grouped and stacked

API reference

Every component also accepts the props of the element it renders.

BarChart

PropTypeDefaultDescription
dataobject[]—Rows.
indexstring—Key for x-axis labels.
categoriesstring[]—Numeric series keys to draw.
labelsRecord<string, string>—Display names for series.
colorsstring[]—Series colors; the first is the theme accent.
valueFormatter(value) => string—Value format; defaults to localized numbers.
heightnumber260Height in px; width follows the container.
showLegend / showGrid / showXAxis / showYAxis / showTooltipbooleantrueToggle parts.
stackedbooleanfalseStack.