Skip to content
Calm motion: animations on this site only fade, with no movement

Beeswarm ​

Each value as a dot on one axis, with no overlap

Shows every value of a set, so the spread and the clusters show. Dots with close values move up or down, so all of them stay in view. For a summary of the spread, use the box plot. For values in bins, use the histogram.

Basic
Length of each episode
GroupCountLowestMedianHighest
Interviews2044 min52 min66 min
Solo episodes1518 min24 min33 min
  • data is a list of numbers, or of points with a value, an optional label for the hover, and an optional group.
  • groups gives each group a key, a label, and an optional color. A legend names them.
  • In order of value, each dot takes the free place nearest to the middle line. A dense part of the data makes a wide swarm.
  • radius sets the size of a dot in pixels (default 5), and height sets the height of the chart (default 200). If the swarm is taller than the chart, make the chart taller or the dots smaller.
  • For screen readers, the chart is a table with the count, the lowest value, the median, and the highest value of each group. label names the table. Change the words with labels or a label pack: group, count, min, median, max, and all.

Usage ​

ts
import { BlessBeeswarm } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
data*(number | BlessSwarmPoint)[]—
groups{ key: string; label: string; color?: string | undefined; }[][]the names and colors of the groups
radiusnumber5the radius of a dot in pixels
heightnumber200
format((v: number) => string)—
labelstring"Chart"names the chart and its table for screen readers
labelsPartial<{ group: string; count: string; min: string; median: string; max: string; all: string; }>—

Released under the MIT License. Character names and artwork belong to their owners.