Skip to content
Graph Craft

Sankey Diagram

FacebookX
Example: Website visitors from 3 channels who did or didn't sign up (people, made-up data)Apache ECharts

Variant: Standard

Made-up data, for demonstration only

Variants

4 types · click one to see it in the frame above
Difference from standard
The recommended type; use it as a starting point
Use when
See the quantity flowing between sources and destinations

Sankey Diagram is a diagram that joins sources to destinations with bands. The wider the band, the more flows along that link. This example follows 250 website visitors (made-up data) from 3 channels to the result: signed up or did not sign up.

How to read a Sankey Diagram

  • Read from left to right. The left is the channel visitors came through and the right is the outcome.
  • Band width is the number of people. 100 visitors came from ads, 100 from search and 50 directly, 250 in all.
  • Look at the right side. 70 people signed up (28%) and 180 did not.
  • Compare the share within each channel. Of direct visitors 20 of 50 signed up (40%), from search 30 of 100 (30%) and from ads 20 of 100 (20%). A large count is not always a high rate.
  • If one band is highlighted in colour, follow it to the end. Try the "Highlight one path" variant (search → signed up).
  • The totals on the left and right are equal. If they are not, some quantity is lost or added along the way, and the chart should show it.

When to use it

  • You want to show where a quantity flows from and to. A Sankey shows a weighted network, which means a flow.
  • There are not so many nodes that crossing bands are hard to read. Readers can still follow a path.
  • You want to show a change of state. Nodes are repeated as several groups in place of stages, to show evolution between two states.
  • You need to explain the quantity that goes in, goes out or is lost between steps, such as energy, money or people.

When not to use it

  • You need to read exact values. Width is hard to read as a number. Use a Bar Chart, or add number labels (the "Value labels" variant).
  • There are so many stages and nodes that the bands tangle. Reduce the nodes or use Parallel Sets.
  • The data is not a flow. If a line does not mean a quantity moving from source to destination, do not use bands.
  • There are loops (flow going back). They are very hard to read. Use a Flowchart or a Chord Diagram.

Common mistakes

1. Every band stands out equally

If the question is "how many people from search signed up", readers have to hunt for it. Highlight one path and fade the others.

2. No numbers

Width tells you which is bigger, but real values need numbers beside them.

3. Nodes in no set order

Sort by size or by group so the bands cross less.

BadEvery flow equally prominent

Synthetic 250 visitors: you have to find the "Search → Sign-up" flow yourself

GoodHighlight Search → Sign-up

Same data: 30 people from Search signed up; other flows remain but fade

4. Totals on the two sides differ with no explanation

If a quantity is lost or added, show it as a separate band or node.

5. Different units in the same band

Every band must use one unit, such as people or dollars.

Compared with similar charts

ChartHow it differsChoose it when
Sankey DiagramBands sized by quantity, flowing across stagesA quantity flows from source to destination
Alluvial DiagramBands across periods, showing group changesGroups change status over time
Chord DiagramA circle, two-way flow between groupsFlow back and forth within the same groups
Parallel SetsStresses relationships between categoriesSeveral categorical variables

History and development

Charles Joseph Minard's 1869 map of Napoleon's march on Russia, where line width stands for the number of soldiers
Minard's 1869 flow map, where line width stands for the number of soldiers. It is an early example of width standing for quantity, not the first Sankey diagram · Public domain image from Wikimedia Commons

Riall Sankey used a diagram of energy flow to analyse the thermal efficiency of steam engines in work published in 1898. Charles Joseph Minard's 1869 map of Napoleon's campaign also uses line width for numbers of soldiers, but it is a flow map, not a Sankey diagram. After World War 1, Sankey diagrams were used for heat balances of glass and cement plants, and from the 1990s they have been used in product life cycle assessment.

Frequently asked questions

How is a Sankey different from a stacked bar chart?

A Sankey shows the path from source to destination. A stacked bar shows the proportions of the components within each group.

How many nodes should there be?

There is no fixed number, but the fewer, the easier to read.

How long have Sankey diagrams existed?

See the history section.

References

  • Sankey diagram · Data to Viz · www.data-to-viz.comUsed to confirm: how to read a Sankey diagram and what to watch for
  • Fundamentals of Data Visualization, ch. 11: Visualizing nested proportions (11.4 Parallel sets) · Claus O. Wilke · clauswilke.comUsed to confirm: nested proportions, such as mosaic plots and parallel sets
  • The Thermal Efficiency of Steam Engines · Kennedy, A. B. W., & Sankey, H. R. (1898) · Institution of Civil Engineers · zenodo.orgUsed to confirm: the original article in which Sankey first used this diagram
  • The Sankey Diagram in Energy and Material Flow Management, Part I: History · Schmidt, M. (2008) · Journal of Industrial Ecology, 12(1), 82–94 (abstract) · doi.orgUsed to confirm: the history of the Sankey diagram
  • Mapping Time: Illustrated by Minard's Map of Napoleon's Russian Campaign of 1812 (sample chapter) · Esri Press · www.esri.comUsed to confirm: details of Minard's map and how to read the data on it

Last updated 28 Nov 2026