Sankey Diagram

The Sankey Diagram follows a quantity as it splits and merges from one stage to the next. A Sankey is a claim about conservation: what enters a node leaves it. When a row has no value recorded for a later stage, that flow goes no further, and this chart draws it stopping rather than dropping the row and quietly getting thinner from left to right.

Data Requirements

Your Tableau worksheet should include:

  • Up to 5 Dimensions for the Levels encoding. One stage each, in the order the flow runs. Two levels give a plain source to target diagram; five give a full path.
  • 1 Measure for the Value encoding. The size of each flow, which sets the thickness of every ribbon.

Add Sankey Diagram to your worksheet

First, download the manifest file. It tells Tableau where to load the extension from.

Download sankey.trex

Direct link: https://dataskera.com/downloads/sankey.trex

Then, in Tableau:

  1. On the Marks card, open the Mark type dropdown, and under Viz Extensions choose Add Extension.
  2. In the Add an Extension dialog, choose Access Local Viz Extensions, then open the sankey.trex file you just downloaded.
  3. When Tableau asks, allow the extension to access the data in the workbook.
  4. The welcome screen appears. Sign in with your Dataskera account, or on Tableau Desktop choose Use on Desktop without an account. See Signing in & access below.
  5. Build the chart: drag two or more dimensions onto Levels, in the order the flow runs, then a measure onto Value.
Tableau Server or Cloud:
A site admin must allow the extension by adding its URL to the site's safe list, and the view needs the Download Summary Data permission. Extension URL: https://vizextension.dataskera.com/sankey/sankey.html

Signing in & access

Sankey Diagram is free. Whether you need to sign in depends only on what you are doing. Viewing a dashboard never asks for an account, and authoring is free too.

Viewing a dashboard
No account

People who only view a dashboard are never asked to sign in and are never blocked.

Editing on Tableau Desktop
Optional

Sign in, or continue without an account in a single click.

Editing on Server or Cloud
Free account

Sign in with your Dataskera account to author on the web.

No account yet? Create one free in under a minute. No credit card required.

Format panel

Open the Format panel from the extension menu to customize the chart. It is for the dashboard author and is not shown to viewers. It has four tabs:

  • General: node order (fewest crossings, data order or largest first), whether to mark the flow that stops before the last stage, node width and spacing, ribbon curve, opacity and colour, node and stage labels, number format and font.
  • Color: a palette, a precise colour per category, and the overall opacity.
  • Legend: show or hide it, its position around the chart, an optional show/hide toggle for viewers, the colour swatch, and the content of each entry.
  • Tooltip: show or hide it, its colours, decimals, and a template you write yourself from the placeholders the chart provides.
Flow that stops before the end:
A path runs as far as its filled stages. The part of a node that carries on nowhere is hatched, has its own tooltip, and is totalled under the chart, for example “307K (23.5%) stops before Segment”. Turn the option off in the General tab and the flow is simply not drawn, as other tools do it.
One scale for the whole diagram:
Ribbon thickness is taken from the busiest stage and used everywhere, so the same quantity has the same width wherever it appears. Scaling each stage to fill the height would make a stage that lost flow look exactly as full as the one before it.
Crossings:
Ribbons crossing each other is what makes a Sankey hard to read, and minimising the crossings is a hard problem with no exact answer. Fewest crossings sweeps the diagram back and forth six times, settling each node next to the ones it exchanges the most with. Data order and largest first are there when you want the order fixed.
Negative values:
A ribbon cannot be narrower than nothing, so negative values are left out and counted, and a notice on the chart reports how many. Rows with no stage filled in are reported the same way.