Labeled Streamgraph
✓ Published1🌍 Public
A streamgraph displays four time series—Leonardo, Donatello, Raphael, and Michelangelo—as smoothly curved stacked areas. The code uses D3 v4 with the `d3-area-label` plugin to automatically place white labels inside each layer. Random walk data updates every two seconds, triggering animated transitions that recompute the stacked layout via `d3.stack().offset(d3.stackOffsetWiggle)` and redraw the areas with `d3.area` and `d3.curveBasis`. The `d3.areaLabel(area)` helper positions each label along the final shape.
AI-generated descriptionUses d3-area-label to position labels on a StreamGraph.
Inspired by Noah Veltman’s Block: Stacked area label placement
Originally built with blockbuilder.org. See also:
MIT Licensed