Pro
Beeswarm chart
Every value as its own dot along one axis, packed so none overlap. Splitting by group moves each dot into its lane, so you watch the groups separate.
pnpm dlx shadcn@latest add @caliper/beeswarm-chartWhen to use
Use it for
- Deal sizes, response times or salaries where each item matters.
- Up to a few hundred items.
Skip it when
- Thousands of values; use the histogram.
- Values over time; use a line or scatter chart.
Installation
pnpm dlx shadcn@latest add @caliper/beeswarm-chart
Adds its 7 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
Usage
Import it from your copy of the source. The example behind the preview comes with the source. It is built from swarmOffsets and BeeswarmChart.
import { swarmOffsets, BeeswarmChart } from "@/components/ui/beeswarm-chart"
The worked example comes with Pro
The 29-line example behind the preview opens here, ready to copy.
- 626 Pro parts, blocks and page templates, all with source
- $149 once, with lifetime updates. No renewal
- A full refund within 14 days if it is not for you
API reference
swarmOffsets
component
No props of its own; it accepts the native props of its root element.
BeeswarmChart
component
Accessibility
It exposes group and status semantics, with aria-label, aria-busy and aria-hidden kept in step with state. Changes that matter are announced through a live region.
No custom key handling; Tab and the native activation keys do the work.
Motion
Transitions use the shared duration and easing tokens. Under prefers-reduced-motion those tokens collapse to instant and travel distances go to zero, so state changes still happen without movement.
Related
- Box plotDistributions side by side as five-number summaries with outliers. Switching to every value spreads the points out from the median on the same axis.
- HistogramThe shape of a distribution. Choosing coarser or finer bins retargets the same bars, and the median and p95 markers slide to their values.
- Scatter chartTwo measures per item, with an optional third as point size. Points grow in, hidden groups shrink away, and a trend line with its fit draws after them.