Skip to content

sankey ​

Use for directed flows between nodes. One row = one link: x source, series target (required), y flow ≥ 0. Keep input row order. Nodes = unique x ∪ series. Self-links (x value equals series value) → E_UNKNOWN_FIELD. A cycle → E_SANKEY_CYCLE. A repeated source/target pair → E_DUP_KEY. Equal values share one thickness. Negatives → E_NEGATIVE_VALUE.

Do not use for hierarchical part-to-whole (treemap) or ordered stage drop-off (funnel).

x category (source) · y number (flow ≥ 0) · series required (target)

Rules. One row = one link. Keep order. Self-link → E_UNKNOWN_FIELD. A cycle → E_SANKEY_CYCLE. Equal values share one thickness. A repeated source/target pair → E_DUP_KEY.

Example ​

chart
markvis: 2
type: sankey
title: Five Points still feeds Midtown before Arts Center
x: from
y: riders
series: to

from,to,riders
North Springs,Five Points,620
Airport,Five Points,540
Five Points,Midtown,880
Five Points,Peachtree Center,410
Midtown,Arts Center,390
Five Points still feeds Midtown before Arts Center sankey chart. Five Points still feeds Midtown before Arts Center. x=from. y=riders. series=to. 5 rows. Five Points still feeds Midtown before Arts CenterFive Points still feeds Midtown before Arts Center North SpringsNorth Springs Five PointsFive Points AirportAirport MidtownMidtown Peachtree CenterPeachtree Center Arts CenterArts Center
Five Points still feeds Midtown before Arts Center
fromtoriders
North SpringsFive Points620
AirportFive Points540
Five PointsMidtown880
Five PointsPeachtree Center410
MidtownArts Center390

When the block is wrong ​

The rows stay, with one line that names the error.

chart
markvis: 2
type: sankey
title: Self link
x: from
y: riders
series: to

from,to,riders
Five Points,Five Points,120
fromtoriders
Five PointsFive Points120

E_UNKNOWN_FIELD: sankey self-link (source equals target)

Generated from packages/types/sankey/ and the type's row in SPEC.md.

0.0.13 lives under legacy/