Dither Scatter
betaA bubble scatter drawn in dithered cells: floating bubbles sized by value that glide between data sets, with a per-point readout.
- Data
- 1 file
- 1 npm package
- Accessibility notes
- Draws on a canvas
pnpm dlx @dowel-ui/cli add dither-scatternpm packages installed: class-variance-authority.
import { DitherScatter } from "@/components/ui/dither-scatter";Default
Traffic Scatter Bubbles
Gallery
Pinned Point
With Visible Table
Static
<DitherScatter>
| Prop | Type | Default |
|---|---|---|
data (required) | readonly DitherScatterDatum[] | — |
label (required)What the chart shows. Names the image, the points and the data table. | string | — |
activeIndexThe pinned point (controlled); null pins none. | number | null | — |
animate | boolean | true |
categoryLabelHeader of the data table's point column. | string | "Point" |
cell | number | 3 |
defaultActiveIndex | number | null | null |
descriptionReplaces the generated summary in the image's accessible name. | string | — |
formatValue | (value: number) => string | formatDitherValue |
maxRadiusLargest bubble radius as a fraction of the plot height. Default 0.26. | number | 0.26 |
minRadiusSmallest bubble radius as a fraction of the plot height. Default 0.07. | number | 0.07 |
onActiveIndexChange | (index: number | null) => void | — |
showTableShow the data table. It is always present for assistive technology. | boolean | false |
size | "sm" | "md" | "lg" | "md" |
sizeLabel | string | "Size" |
xDomainAxis ranges. Default from 0 to a round number above the largest value. | readonly [number, number] | — |
xLabelNames of the three values, for the readout, the points and the table. | string | "X" |
yDomain | readonly [number, number] | — |
yLabel | string | "Y" |
Plus every attribute of <div> except children.
10/10
checks passed
- Tested — passes
- axe assertion — passes
- Keyboard tested — passes
- Storybook examples — passes
- Accessibility documented — passes
- Semantic tokens only — passes
- Motion from tokens — passes
- className merged — passes
- Visible focus — passes
- No fixed widths — passes