Sankey Chart

ОбзорДокументацияИстория версий

Sankey Documentation

Table of contents

 

Chart Types

Sankey Diagram Extension for Qlik provides the following chart types:

  • Sankey Diagram

A Sankey diagram shows how values flow from one set of categories to another. Nodes (rectangles) represent categories, and links (curved bands) represent the flow between them. The wider the link, the larger the value being transferred.

This section explains how to create and configure a Sankey Diagram chart.

Other chart types are available via AnyChart Extensions.

Downloading and Installing

Qlik Sense Desktop

To install the Sankey Diagram Extension in Qlik Sense Desktop, do the following:

  1. Download Sankey Diagram Extension for Qlik Sense.
  2. Extract the archive.
  3. Open a Windows Explorer window and navigate to the Qlik Sense Extensions directory: 
    ..\Users\<UserName>\Documents\Qlik\Sense\Extensions.
  4. Copy the anychart-4x-sankey folder to the Extensions directory.
  5. Relaunch Qlik Sense Desktop.

Qlik Sense Server

To install the Sankey Diagram Extension on a Qlik Sense server, do the following:

  1. Download Sankey Diagram Extension for Qlik Sense.
  2. Open Qlik Management Console (QMC): https://<QPS server name>/qmc
  3. Select Extensions on the QMC start page or from the Start drop-down menu.
  4. Click Import in the action bar.
  5. In the dialog, select the downloaded archive. Leave the password area blank.
  6. Click Open in the file explorer window.
  7. Click Import.

Qlik Sense Cloud

To install the Sankey Diagram Extension in Qlik Sense Cloud, do the following:

  1. Download Sankey Diagram Extension for Qlik Sense Cloud.
  2. Extract the archive.
  3. Access the Management Console:
    • add /console to your tenant address: https://<your tenant address>/console
    • or use the navigation link Administration under the user profile in the hub
  1. Go to the Extensions page and click Add.
  2. In the dialog, select the archive with the extension – for example, anychart-4x-sankey.zip.
  3. Click Add.
  4. Repeat the steps above to add other extensions.
  5. In the Management Console, go to the Content Security Policy section and click Add.
  6. In the dialog, give the Content Security Policy a name – for example, AnyChart.
  7. Type the address of the origin server: qlik.anychart.com
  8. Select the following directives:
    • connect-src
    • font-src
    • img-src
    • script-src
    • style-src
  1. Click Add.

Overview

The Sankey Diagram extension visualizes flow and quantity relationships between categories across multiple stages. It is the go-to chart for answering questions like “where does the money go?”, “how does traffic flow through the system?”, or “which paths carry the most volume?”

Common use cases include budget allocation, supply chain analysis, customer journey mapping, energy flow visualization, and website traffic analysis.

The extension supports two data modes: hierarchical mode, where each dimension represents a flow level from left to right, and link table mode, where two dimensions define source and target nodes directly — enabling custom topologies and circular flows.

Read Quick Start and Dimensions and Measures to learn how to add a Sankey Diagram and configure its data.

The available settings include: colors (node and link), labels, level headers, node layout, tooltips, and interactivity (including link click selection).

Demos

To help you better understand what a Sankey diagram is and how to use it, we prepared a demo app that showcases all major features. You can check it out in the AnyChart Qlik Demo Apps section.

Quick Start

This quick tutorial explains how to create a basic Sankey Diagram.

First, add an empty chart to your sheet:

  1. Go to Custom objects > AnyChart in the assets panel.
  2. Drag an empty Sankey Diagram chart to the sheet.

Then add the dimensions that define your flow levels:

  1. Go to Data > Dimensions in the properties panel.
  2. Click Add dimension and select a dimension.

Add at least two dimensions. Each dimension creates a column of nodes. For example, to show budget flow from departments to cost centers to vendors, add three dimensions in that order.

Finally, add a measure that represents the flow value:

  1. Go to Data > Measures in the properties panel.
  2. Click Add measure and select a measure – for example, Sum(Amount).

You should now see a Sankey diagram with nodes on the left and right connected by curved links. The link width is proportional to the measure value.

Please note that you can also create dimensions and measures from fields or add them by clicking on the buttons on the empty chart.

Dimensions and Measures

Dimensions

To add a dimension, do the following:

  1. Go to Data > Dimensions in the properties panel.
  2. Click Add dimension and select a dimension.

The Sankey Diagram requires at least two dimensions. You can add up to ten.

In hierarchical mode (the default), each dimension represents a column of nodes. The order of dimensions defines the left-to-right flow: Dimension 1 is the leftmost column, Dimension 2 is the next, and so on. You can drag dimensions to reorder them.

Three to five dimensions is the sweet spot for readability. Two dimensions produces a simple chart (consider a bar chart instead), while more than six makes the diagram dense and harder to read.

Measures

To add a measure, do the following:

  1. Go to Data > Measures in the properties panel.
  2. Click Add measure and select a measure.

Exactly one measure is required. The measure determines the width of the links between nodes — larger values produce wider links.

By default, the Sankey Diagram uses hierarchical mode: each dimension represents a flow level, and the chart creates links between adjacent levels automatically.

If your data is structured as a flat edge list (source, target, value), you can use link table mode instead. In this mode, only two dimensions are used: the first defines source nodes and the second defines target nodes. The measure is the flow value for each link.

Link table mode allows you to model custom graph topologies, including circular flows (e.g., A → B → C → A) that are not possible in hierarchical mode.

The extension detects the appropriate mode automatically based on your data structure.

Colors

The Sankey Diagram provides independent color controls for nodes and links. All color settings are located in Appearance > Colors in the properties panel.

Node Colors

Node coloring determines how the rectangles in the diagram are colored. To change the node coloring mode, go to Appearance > Colors and select an option from the Node coloring dropdown:

  • By dimension level (default) – all nodes in the same column share one color from the Qlik palette. This is the best option for seeing the overall flow structure.
  • Unique per node – every node gets a distinct color from the palette. Use this when you want to track individual nodes across the diagram.
  • Single color – all nodes use one color. A minimalist look, good for exports and printing. When this mode is selected, a color picker appears to choose the color.

Link coloring determines how the curved bands between nodes are colored. To change the link coloring mode, go to Appearance > Colors and select an option from the Link coloring dropdown:

  • Source node color (default) – each link inherits the color of its source (left) node.
  • Target node color – each link inherits the color of its target (right) node.
  • Gradient – each link blends smoothly from the source node color to the target node color. This mode makes it easy to see where flow originates and where it ends up.
  • Single color – all links use one color. When this mode is selected, a color picker appears to choose the color.

The transparency of links is controlled by the Link opacity slider in Appearance > Colors. The range is 0.1 (nearly transparent) to 0.8 (nearly opaque), with a default of 0.4.

Lower opacity values (0.2–0.3) work well when you have many overlapping links. Higher values (0.5–0.7) work well when you have fewer links and want them to stand out.

Master Item Colors

If your dimensions are master items with assigned colors, those colors are used automatically. Master item colors override the palette in both By dimension level and Unique per node modes.

To control this behavior when using Single color mode, use the Use master dimension colors checkbox in Appearance > Colors. When checked, master item colors still override the single color for dimensions that have colors assigned.

Labels

Labels appear on each node to identify it and, optionally, display its value. Label settings are located in Appearance > Labels in the properties panel.

Label Visibility

To control whether labels are shown, go to Appearance > Labels and select an option from the Node labels dropdown:

  • Auto (default) – labels are shown when there is enough space. Small nodes suppress their labels to avoid overlap.
  • All – labels are always shown. May cause overlap on dense charts.
  • None – all labels are hidden.

Label Content

To control what text appears in labels, go to Appearance > Labels and select an option from the Label content dropdown:

  • Name – node name only (e.g., “Manufacturing”).
  • Value – measure value only (e.g., “$650K”).
  • Name + Value (default) – both name and value (e.g., “Manufacturing: $650K”).
  • Name + Value + % – name, value, and percentage of total flow at that level (e.g., “Manufacturing: $650K (23%)”). This is the most informative option for presentations and dashboards.

Label Position

To control where labels are placed, go to Appearance > Labels and select an option from the Position dropdown:

  • Auto (default) – labels are placed outside the node when there is room, and inside when the node is at the edge of the chart.
  • Outside node – labels are always placed outside the node rectangle.
  • Inside node – labels are centered inside the node rectangle. Works best with wider nodes.

Level Headers

Level headers display the dimension name above each column of nodes, so the viewer always knows what each level represents (e.g., “Region”, “Department”, “Expense Category”).

To enable or disable level headers, go to Appearance > Labels and toggle the Level headers switch.

Level headers are enabled by default. They are especially useful on charts with four or more dimensions, where the meaning of each column may not be immediately obvious.

Node Layout

The layout of nodes in the diagram can be tuned with three sliders in Appearance > Presentation:

  • Node width (4–80 px, default 24) – how wide each node rectangle is. Wider nodes make labels easier to read; narrower nodes leave more room for links.
  • Node spacing (0–50 px, default 8) – the vertical gap between nodes in the same column. Increase for more breathing room, decrease to pack nodes tighter.
  • Link curvature (0–1, default 0.33) – how curved the links are. A value of 0 produces straight lines, 0.33 produces smooth default curves, and 1 produces highly rounded curves.

Tooltips

Tooltips appear when you hover over nodes and links. They provide detailed information without cluttering the chart.

Node tooltips show the node name, its total flow value, and its share of the level total (e.g., “23% of level”).

Link tooltips show the source and target names, the flow value between them, and the percentage of total flow that the link carries.

To enable or disable tooltips, go to Interactivity > Tooltip in the properties panel and toggle the Tooltips switch.

To show or hide the percentage in tooltips, use the Show percentage checkbox, which appears when tooltips are enabled.

Interactivity

The Sankey Diagram supports full Qlik selection integration. Interactivity settings are located in the Interactivity section of the properties panel.

Selections

When selections are enabled, the chart responds to clicks:

  • Click a node to select that dimension value. The standard Qlik confirm/cancel toolbar appears. You can click additional nodes in the same dimension to add them to the selection (toggle behavior). Clicking a node from a different dimension ends the current selection and starts a new one.
  • Click a link to select both the source and target dimension values simultaneously. This is a unique capability — it allows you to filter the entire Qlik model to a specific flow path in a single click.

During an active selection, selected nodes and their connected links are highlighted, while unrelated elements are dimmed.

To enable or disable selections, go to Interactivity > Selections and toggle the Selections switch. When disabled, clicks do nothing and the chart is view-only.

Combine the Sankey Diagram with filter panes on the same sheet — when you click a node or link, the filter pane shows exactly what is selected, making the interactivity visible to your audience.

Snapshots

The extension supports Qlik snapshots for use in stories and NPrinting.

To enable or disable snapshot support, go to Interactivity > Snapshots and toggle the Snapshots switch.

Calculation Conditions

The Sankey Diagram supports calculation conditions: you can set a condition that needs to be fulfilled for the chart to be displayed. If the condition is not fulfilled, a custom message is shown instead.

A calculation condition is useful when the number of nodes is very large and makes the visualization slow to respond. It can help ensure that users first filter the data to a manageable level by applying selections.

To add a condition, do the following:

  1. Go to Add-ons > Data handling in the properties panel.
  2. Enter an expression in the Calculation condition input box.
  3. Enter a string value or a string expression in the Displayed message input box.

Tips and Best Practices

  • 3–5 dimensions is the sweet spot for readability. Keep the total node count under 30–40 across all columns for the clearest results.
  • Use By dimension level coloring (the default) for most use cases — it visually separates the flow stages without adding visual noise.
  • Use Gradient link coloring when you want to emphasize where flow originates and where it ends up.
  • The Name + Value + % label content mode is the most informative option for presentations. Analysts can read values directly on the chart without needing to hover for details.
  • Use link table mode when your data is already an edge list (source, target, value). There is no need to restructure it into a hierarchy.
  • Pair the Sankey Diagram with filter panes on the same sheet. When you click a node or link, the filter pane shows the active selection — this makes the interactivity obvious to your audience.

Другие расширения AnyChart
SpreadsheetsДерево декомпозицииBullseye ChartКруговой индикаторКомбинированная диаграммаCолнечный лучПроектная диаграмма ГантаРесурсная диаграмма ГантаВременная шкалаКлассический водопадРасширенный водопад
Скачать расширение Sankey Chart
Скачать
Поделиться страницей
LinkedInFacebookXEmail
---