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
| day | Commits |
|---|---|
| Day 1 | 6 |
| Day 2 | 10 |
| Day 3 | 9 |
| Day 4 | 8 |
| Day 5 | 10 |
| Day 6 | 10 |
| Day 7 | 5 |
| Day 8 | 4 |
| Day 9 | 6 |
| Day 10 | 5 |
| Day 11 | 4 |
| Day 12 | 7 |
| Day 13 | 11 |
| Day 14 | 10 |
| Day 15 | 10 |
| Day 16 | 12 |
| Day 17 | 12 |
| Day 18 | 8 |
| Day 19 | 6 |
| Day 20 | 8 |
| Day 21 | 8 |
| Day 22 | 5 |
| Day 23 | 8 |
| Day 24 | 12 |
| Day 25 | 12 |
| Day 26 | 11 |
| Day 27 | 14 |
| Day 28 | 15 |
| Day 29 | 11 |
| Day 30 | 9 |
| Day 31 | 11 |
| Day 32 | 10 |
| Day 33 | 7 |
| Day 34 | 9 |
| Day 35 | 14 |
| Day 36 | 14 |
A dense row of thin rounded teeth for long runs of values.
npx shadcn@latest add ikislay/pixel-ui/comb-chartimport { CombChart } from "@/components/ui/comb-chart"const data = Array.from({ length: 30 }, (_, i) => ({day: String(i + 1),commits: Math.round(4 + Math.random() * 10),}))export function Demo() {return (<CombChartlabel="Commits per day"data={data}index="day"series={[{ key: "commits", label: "Commits" }]}/>
1// Loading…
Options you can pass to customize this component.
data*Record<string, string | number>[]One object per point along the x axis.
index*stringThe key in each object that labels the x axis.
series*{ key: string; label?: string; color?: string }[]The key to plot. Only the first series is drawn.
label*stringNames the chart for screen readers and captions its data table.
heightnumberHeight in pixels. The width fills the parent.
format(value: number) => stringFormats values wherever the chart shows them. Defaults to short numbers like 12.4K.
classNamestringMerged onto the root element.