Sankey diagram
Where things come from and where they go.
Definition · Updated Nov 2, 2026
A Sankey diagram draws flows from sources on the left to outcomes on the right, with each band as wide as its amount. You see which source feeds which outcome. Use it for sessions from channel to result, budget from team to spend or energy from source to use.
Pay once. Every update included.
Live preview
Sample data: sessions from four sources to four outcomes, search 4,200, purchased 2,100
- Data shape
- Amounts from each source to each outcome
- Good for
- Traffic to outcome, budget to spend
- Avoid when
- There is one source or one outcome
- Sizes
- XS, S, M and L, re-laid out from the data
Anatomy
Inspect it like the Figma file.
The same layers, names and tokens as the component. Select one to read its size, fill and style.
Layers
031 / Sankey
- Layer
- flow · search → purchased
- Type
- Vector
- Size
- 744 × 30
- Fill
- data/cat-1
- Group
- Marks · 20
Layers
031 / Sankey
- Layer
- flow · search → purchased
- Type
- Vector
- Size
- 424 × 21
- Fill
- data/cat-1
- Group
- Marks · 20
Layers
031 / Sankey
- Layer
- flow · search → purchased
- Type
- Vector
- Size
- 263 × 18
- Fill
- data/cat-1
- Group
- Marks · 20
Sizes
Re-laid out, never scaled.
The same data at XS, S, M and L. Every size is redrawn from the data, so text and line weights never shrink.
M against S
Width360 px480 px
Plot328 px440 px
Labels1616
Marks2020
Height212 px246 px
Same tokens at every size: text styles, 1 px lines and mark radius stay put.
When to use
From where to where.
Three signs it fits, and three signs another type fits better.
Are they amounts, not steps?
Steps from one total to another.
Yes: Keep the sankey
Code and Figma
One name in Figma and in code.
Every Figma property is a prop with the same name and values. One command installs it.
Figma
chart/031-sankey
npx shadcn add @chartory/sankeyimport { Sankey } from "@/components/chartory/sankey"import { sessionFlow } from "./session-flow"export function SessionFlow() { return ( <Sankey data={sessionFlow} size="m" legend={false} /> )}Hearth widget
Sankey as a widget.
The chart in a Hearth card with a hero number and two blocks. One token set, light and dark.
EmberPreset
ChartoryDefault preset
Pick the blocks, the size and the preset for your own widget.
Read the Hearth widget docsFAQ
Sankey questions.
What people ask before they put a sankey in a dashboard.
Something else?
hello@usechartory.comEach source's and each outcome's total (Search 4,200 on the left, Purchased 2,100 on the right). The bands between them show the split.
Yes. Every session leaves one source and lands in one outcome, so both sides sum to 10,000 in the sample.
One data object in the sample’s shape: amounts from each source to each outcome. The docs page lists every field and links its JSON Schema; the sample data comes with the component, so you can start from it and swap in your own.
Series take the preset’s data colours in order, and states such as up, down or warning take its status colours. Change the preset in Figma or in code to recolour every chart at once.
XS, S, M and L, in light and dark. Each size is laid out again from the data, so text and lines keep their size.
Yes. It plays in when it scrolls into view, and when the data changes every mark moves from its old place to its new one. With reduced motion on, it does not move.
Yes. The React component is free in the public registry in Hearth, no token needed; Signal comes with Code and Complete. The Figma component comes with Figma and Complete.
Ask for it by name. The MCP server tells the agent what data it needs and runs the same command: npx shadcn add @chartory/sankey. You review the diff.
Related types
Other ways to show flow between steps.
The same question, a different shape of answer. Every type ships in Figma and in code.
Same family
Flow between steps
Where volume goes: funnels, bridges and cycles.