Simulates prefers-reduced-motion for the demo. Off follows your system setting.
Steps focus through the demo with ] and [. Tab, arrows, and Escape stay native so the component behaves as shipped.
1
| hour | orders |
|---|---|
| 0:00 | 11 |
| 1:00 | 13 |
| 2:00 | 8 |
| 3:00 | 4 |
| 4:00 | 4 |
| 5:00 | 8 |
| 6:00 | 16 |
| 7:00 | 17 |
| 8:00 | 15 |
| 9:00 | 21 |
| 10:00 | 34 |
| 11:00 | 43 |
| 12:00 | 42 |
| 13:00 | 40 |
| 14:00 | 44 |
| 15:00 | 52 |
| 16:00 | 53 |
| 17:00 | 44 |
| 18:00 | 35 |
| 19:00 | 34 |
| 20:00 | 36 |
| 21:00 | 31 |
| 22:00 | 18 |
| 23:00 | 9 |
Rounded bars that radiate around a ring, made for cycles like hours or months.
npx shadcn@latest add ikislay/pixel-ui/radial-bar-chartimport { RadialBarChart } from "@/components/ui/radial-bar-chart"const data = Array.from({ length: 24 }, (_, hour) => ({hour: hour + ":00",orders: Math.round(20 + 15 * Math.sin((hour - 6) / 3.8)),}))export function Demo() {return <RadialBarChart label="Orders by hour" data={data} index="hour" value="orders" totalLabel="Orders" />}
1// Loading…
Options you can pass to customize this component.
data*Record<string, string | number>[]One object per bar, clockwise from the top.
index*stringThe key in each object that names the bar.
value*stringThe key in each object that holds the bar's value.
label*stringNames the chart for screen readers and captions its data table.
format(value: number) => stringFormats values wherever the chart shows them. Defaults to short numbers like 12.4K.
colorstringAny CSS color for the bars.
totalLabelstringThe caption above the total in the center.
classNamestringMerged onto the root element.