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
| Point | Series | Load time (s) | Conversion |
|---|---|---|---|
| 1 | Desktop | 0.4s | 75% |
| 2 | Mobile | 0.4s | 91% |
| 3 | Desktop | 0.55s | 92% |
| 4 | Mobile | 0.55s | 64% |
| 5 | Desktop | 0.69s | 65% |
| 6 | Mobile | 0.69s | 80% |
| 7 | Desktop | 0.84s | 80% |
| 8 | Mobile | 0.84s | 72% |
| 9 | Desktop | 0.98s | 63% |
| 10 | Mobile | 0.98s | 56% |
| 11 | Desktop | 1.13s | 71% |
| 12 | Mobile | 1.13s | 76% |
| 13 | Desktop | 1.27s | 75% |
| 14 | Mobile | 1.27s | 51% |
| 15 | Desktop | 1.42s | 53% |
| 16 | Mobile | 1.42s | 69% |
| 17 | Desktop | 1.56s | 74% |
| 18 | Mobile | 1.56s | 48% |
| 19 | Desktop | 1.71s | 57% |
| 20 | Mobile | 1.71s | 47% |
| 21 | Desktop | 1.85s | 53% |
| 22 | Mobile | 1.85s | 58% |
| 23 | Desktop | 2s | 56% |
| 24 | Mobile | 2s | 31% |
| 25 | Desktop | 2.15s | 45% |
| 26 | Mobile | 2.15s | 49% |
| 27 | Desktop | 2.29s | 64% |
| 28 | Mobile | 2.29s | 38% |
| 29 | Desktop | 2.44s | 38% |
| 30 | Mobile | 2.44s | 40% |
| 31 | Desktop | 2.58s | 50% |
| 32 | Mobile | 2.58s | 35% |
| 33 | Desktop | 2.73s | 50% |
| 34 | Mobile | 2.73s | 17% |
| 35 | Desktop | 2.87s | 30% |
| 36 | Mobile | 2.87s | 38% |
| 37 | Desktop | 3.02s | 49% |
| 38 | Mobile | 3.02s | 14% |
| 39 | Desktop | 3.16s | 24% |
| 40 | Mobile | 3.16s | 17% |
| 41 | Desktop | 3.31s | 45% |
| 42 | Mobile | 3.31s | 25% |
| 43 | Desktop | 3.45s | 31% |
| 44 | Mobile | 3.45s | 8% |
A dot plot that shows how two measures relate across many items.
npx shadcn@latest add ikislay/pixel-ui/scatter-chartimport { ScatterChart } from "@/components/ui/scatter-chart"const series = [{label: "Pages",points: [{ x: 1.2, y: 64, label: "Home" },{ x: 2.8, y: 41, label: "Pricing" },{ x: 0.6, y: 82, label: "Docs" },],},]export function Demo() {return <ScatterChart label="Load time against conversion" series={series} xLabel="Load (s)" yLabel="Conversion" />
1// Loading…
Options you can pass to customize this component.
series*{ label: string; color?: string; points: { x: number; y: number; label?: string }[] }[]Groups of points. Colors follow the chart palette in order unless you set one.
label*stringNames the chart for screen readers and captions its data table.
xLabelstringNames the horizontal measure under the axis and in the tooltip.
yLabelstringNames the vertical measure in the tooltip.
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.
formatX(value: number) => stringFormats horizontal values, like format does for vertical ones.
classNamestringMerged onto the root element.