Components › Charts
Bar chart
Rounded bars on a track. Bars grow in; hover or focus a bar for its value.
Installation
npx plankui@latest add bar-chartUsage
import { BarChart } from "@/components/ui/bar-chart";
<BarChart data={[{ label: "Mon", value: 420 }, { label: "Tue", value: 380 }]} highlight={1} />API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| data | { label: string; value: number }[] | required | Bars. |
| highlight | number | Index drawn in the full accent. | |
| format | (n: number) => string | Axis and tooltip format. | |
| height / ticks | number | 200 / 4 | Plot height and guide lines. |