Skip to content

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

Sessions to outcome10,000 sessions this week from 4 sources; 2,100 ended in a purchase (21%), Search brought the most at 4,200.Search4,200Social2,600Email1,900Direct1,300Purchased2,100Abandoned cart2,600Browsed3,100Bounced2,200
Sessions to outcome
SourcePurchasedAbandoned cartBrowsedBounced
Search1,1001,2001,200700
Social300600900800
Email500500600300
Direct200300400400

Sample data: sessions from four sources to four outcomes, search 4,200, purchased 2,100

Size
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

chart/031-sankey
plot · sankey
Layer
flow · search → purchased
Type
Vector
Size
744 × 30
Fill
data/cat-1
Group
Marks · 20

Layers

031 / Sankey

chart/031-sankey
plot · 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.

Do flows split and merge?

One path that narrows.

Yes: Keep the sankey

Is there a left and a right side?

Flows between peers.

Yes: Keep the sankey

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

size
legend
Property = propValuesDefault
size"xs" · "s" · "m" · "l""xs"
legendfalsefalse
color"cat-1" · "cat-2" · "cat-3" · "cat-4""cat-1"
npx shadcn add @chartory/sankey
sankey.tsx
import { 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.

Code
Get the code

EmberPreset

ChartoryDefault preset

Pick the blocks, the size and the preset for your own widget.

Read the Hearth widget docs

FAQ

Sankey questions.

What people ask before they put a sankey in a dashboard.

Something else?

hello@usechartory.com
  • Each 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.

Related types

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.