Distribution · Advanced

Beeswarm

A distribution with every dot laid out without overlap.

Open in playground
Use when
Seeing each user's value, group by group
Avoid when
Thousands of dots that overlap (use violin or ridgeline)

Try it

24

Beeswarm

Daily usage time by plan (min)
BeeswarmBeeswarm. 165 points, 3 groups (Free median 9.6 min, Basic median 17.1 min, Pro median 24.4 min).Median 9.6 minMedian 17.1 minMedian 24.4 min
Beeswarm data
Free-1 · Free14.8 min
Free-2 · Free12.6 min
Free-3 · Free15.1 min
Free-4 · Free14.4 min
Free-5 · Free18.2 min
Free-6 · Free8.1 min
Free-7 · Free4.2 min
Free-8 · Free9.7 min
Free-9 · Free6.5 min
Free-10 · Free11.9 min
Free-11 · Free3.3 min
Free-12 · Free9 min
Free-13 · Free7.5 min
Free-14 · Free16.4 min
Free-15 · Free1.1 min
Free-16 · Free12.9 min
Free-17 · Free3 min
Free-18 · Free11.5 min
Free-19 · Free12.6 min
Free-20 · Free3.5 min
Free-21 · Free6.8 min
Free-22 · Free7.9 min
Free-23 · Free12.3 min
Free-24 · Free7.5 min
Free-25 · Free14.6 min
Free-26 · Free11.1 min
Free-27 · Free14.8 min
Free-28 · Free4.9 min
Free-29 · Free2.2 min
Free-30 · Free16.4 min
Free-31 · Free9.2 min
Free-32 · Free1.4 min
Free-33 · Free11.3 min
Free-34 · Free4.3 min
Free-35 · Free10.8 min
Free-36 · Free4.3 min
Free-37 · Free11.7 min
Free-38 · Free13.5 min
Free-39 · Free7.8 min
Free-40 · Free8.7 min
Free-41 · Free15.7 min
Free-42 · Free11.9 min
Free-43 · Free9.7 min
Free-44 · Free9.2 min
Free-45 · Free6.5 min
Free-46 · Free10.6 min
Free-47 · Free9.6 min
Free-48 · Free7.9 min
Free-49 · Free8.4 min
Free-50 · Free6.6 min
Free-51 · Free2.5 min
Free-52 · Free9 min
Free-53 · Free9.3 min
Free-54 · Free6.3 min
Free-55 · Free12.7 min
Free-56 · Free10.4 min
Free-57 · Free11.6 min
Free-58 · Free8.8 min
Free-59 · Free14.2 min
Free-60 · Free9.6 min
and 105 more
The Pro plan also spreads the widestAdvanced

Hover over the chart, or Tab in and use the arrow keys to move between items. The numbers are sample data.

Variants

Named looks for this chart. Each one is the example above with a few options or fields changed. The CLI (ztd-charts example beeswarm --variant <id>) and the MCP server know the same names.

Without median

Daily usage time by plan (min)
Sample data

Large dots

Daily usage time by plan (min)
Sample data

Code

BeeswarmChart.tsx
import { ChartCard, BeeswarmChart } from "ztd-charts";

const data = [
  {"id":"Free-1","plan":"Free","minutes":14.8},
  {"id":"Free-2","plan":"Free","minutes":12.6},
  {"id":"Free-3","plan":"Free","minutes":15.1},
  {"id":"Free-4","plan":"Free","minutes":14.4},
  {"id":"Free-5","plan":"Free","minutes":18.2},
  {"id":"Free-6","plan":"Free","minutes":8.1},
  // … 159 more rows
];

export function Example() {
  return (
    <ChartCard number="24" title="Beeswarm" subtitle="Daily usage time by plan (min)" takeaway="The Pro plan also spreads the widest" level="advanced" replay>
      <BeeswarmChart
        data={data}
        value="minutes"
        group="plan"
        label="id"
        unit=" min"
      />
    </ChartCard>
  );
}

Props

<BeeswarmChart> takes these props. Rows marked Common work the same on every chart.

28 props

Prop
dataRequiredAn array of objects. Pass CSV, REST or database rows as they areobject[]
valueRequiredValue fieldstring | (d, i) => number
groupGroup (row) fieldstring | (d, i) => string
labelDot namestring | (d, i) => string
radiusDot radiusnumber
showMedianShow the median of each groupbooleanDefault true
canvasThresholdDot count that switches to canvasnumberDefault 2000
heightCommonHeight in px. Without it, each chart picks a default that fits its widthnumber
widthCommonFixed width in px. Without it, the chart fits its parentnumber
highlightCommonItem to highlight. An index, a name, an array, or "max" | "min" | "first" | "last" | "none"number | string | (number|string)[] | "max" …
formatCommonValue format. "number" | "integer" | "percent" (values are already percents: 42 → "42%") | "ratio" (0.42 → "42%") | "compact" | "currency" (KRW for Korean locales, otherwise USD; for another currency pass Intl options with currency) | "decimal" or Intl.NumberFormat options"number" | "percent" | "compact" | …
unitCommonUnit appended to values. For example "%" or "ms"string
localeCommonLocale for numbers, dates and the text a chart writes itself (tooltips, screen reader sentences). "ko" or "ko-*" switches to Korean. Falls back to the ThemeProvider localestringDefault "en-US"
animateCommonEntry and update animationbooleanDefault true
durationCommonAnimation length (ms)number
easingCommonMotion curve"spring" | "easeOut" | "easeInOut" | "linear"Default "spring"
staggerCommonDelay between items as they enter (ms)number
reducedMotionCommon"auto" follows the OS setting. true always turns motion offanyDefault "auto"
animateOnViewCommonPlay when the chart scrolls into viewbooleanDefault true
showLabelsCommonLabels drawn on the chart (values and names)booleanDefault true
tooltipCommonShow tooltips. { template: "{label} · {value} · owner {owner}" } writes them: {label}, {value}, {series} or any other column of the row. \n starts a new line, and a line with an empty value is left outtooltipDefault true
syncIdCommonCharts with the same syncId show the hovered x together (line, area, bar, candlestick). <ChartGrid sync> sets one for every chart inside itstring
ariaLabelCommonName for screen readersstring
descriptionCommonDescription for screen readers. Built from the data when omittedstring
onHoverCommonRuns when hover or keyboard focus moves to another item(e: ChartEvent | null) => void
onClickCommonRuns on click, Enter or Space(e: ChartEvent) => void
replayKeyCommonReplays the entry animation when it changesstring | number
themeCommonChanges theme tokens for this chart onlyPartial<ChartTheme>

Above 2,000 items it draws on a canvas. Axes and labels stay SVG.