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| 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 |
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| from | to | riders |
|---|---|---|
| Five Points | Five Points | 120 |
E_UNKNOWN_FIELD: sankey self-link (source equals target)
Generated from packages/types/sankey/ and the type's row in SPEC.md.