You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@glyph/core
- New mark in MarkSchema: "beeswarm". Categorical x (band scale),
quantitative y. Compiler runs per-band 1D non-overlap packing
so dots are placed near their encoded y position but nudged
horizontally within the band so they don't overlap. Visually
halfway between a strip plot and a violin — keeps every
individual data point visible while distribution shape emerges
naturally from density.
- Deterministic placement: rows processed in source order; the
offset-search algorithm is fully deterministic (no random
tiebreaks), so byte-identical SVG on every run.
- Added "beeswarm" to the Phase-1 allowedMarks gate alongside the
other distribution / data marks.
- 4 new tests in src/compiler/beeswarm-mark.test.ts: one circle
per row, 2r minimum spacing between any pair, byte-identical
output across runs, SVG renders with the expected circle count.
site/play
- New "Tenure beeswarm — by team" chip: 4 teams × 12 employees
each, packed by tenure months. Shows the canonical beeswarm
use-case (compare distributions across categories without
binning or losing individual points).
Tests now 720/720 passing. Biome clean. Playground bundle rebuilt.
Tier-2 status after this PR:
- arc ✓ shipped (#106)
- slopegraph ✓ shipped via playground example (#106)
- step-line ✓ shipped (#103 core + #106 example)
- beeswarm ✓ shipped (this PR)
- sankey ← still deferred (next-PR scope: ~400-500 LOC for
longest-path layering + crossing-minimization +
curved bezier links; no existing layout to lean
on)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: site/play/examples/index.json
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -231,6 +231,14 @@
231
231
"csv": "examples/business/step-line.csv",
232
232
"spec": "examples/business/step-line.spec.json"
233
233
},
234
+
{
235
+
"id": "tenure-beeswarm",
236
+
"category": "Business charts",
237
+
"name": "Tenure beeswarm — by team",
238
+
"description": "12 employees × 4 teams. Each dot is one person; the `beeswarm` mark packs them horizontally inside each band so density shows without losing individual points.",
0 commit comments