/docsfor

Sankey

Where quantities come from and go.

import { Sankey } from "diagrammatic";

Three columns: source, convert, use. Every ribbon as wide as its flow. The widths have to add up on every column.

Energy from sources to usessolar 46gas 32wind 24hydro 12grid 82fuel 32industry 43homes 40transport 20export 11sourceconvertuse

Illustrative data. National energy balance, 2024. 114 TWh conserved across three ranks.

fig. 46 · 114 TWh, sources to uses

Solar, wind, and hydro become grid. Gas stays fuel. Homes drink only from the grid. Transport is still entirely bunker. Industry is the only demand that sips both.

Use it for
Distribution across stages: sources into channels into destinations.
Watch out
Links must conserve; leaks and rounding need explaining.

Motion

One sweep crosses the columns in order: every ribbon in the first stage runs together, then hands off to the next, so the flow reads left to right without arrows. Put data-dg-motion on the chart or any ancestor; see Motion.

Where this week's signups came from and wentsearchdocsreferraltemplateblankactivateddroppedsourcefirst actionoutcome

On this page