Sankey Diagram

The Sankey Diagram brings structure and clarity to complex, multi-step data by visualizing how quantities flow from one point to another. Whether you’re tracking website traffic from source to conversion, mapping revenue streams across product lines, analyzing energy consumption, or monitoring process inputs and outputs, this visualization makes relationships instantly understandable.

Notion image

Installation and configuration

The Sankey Diagram plugin can be installed by an Admin, following the directions in Installing QBeeQ Plugins.

Operating system and version support:

  • Linux - Latest
  • Windows - Latest

Creating a new Sankey Diagram

To create a new Sankey Diagram:

  1. Choose QBeeQSankeyCharts from the widget dropdown list
  1. Select data for From and Value
  1. Configure basic settings using the UI
  1. Configure advanced setting using the config.js

Select data

Use the data panel to select data to display on the chart:

  • From - Defines the layers of the Sankey diagram
  • Value - Defines the flows between layers
Data
Behavior
From
The number of layers depends on the number of fields added to this panel. The order of the fields determines the order of the layers in the visualization (from left to right).
Value
One value field: Applied to all flows between all layers. Two value fields: The first value is applied between Layer 0 and Layer 1. The second value is applied to all subsequent layer transitions. Three value fields:The first value is applied between Layer 0 and Layer 1. The second value is applied between Layer 1 and Layer 2. The third value is applied to all subsequent layer transitions. Additional value fields: Each value field applies to the next layer transition in sequence. The final value field applies to all remaining subsequent transitions.

Basic configuration

Settings

Setting
Description
Options
Animation
Enables or disabled animation effects in the visualization
On, Off
Last Layer Labels
Defines the position of the labels for the last layer
Left, Right
Grouping
Controls whether nodes are visually grouped
On, Off
Node Radius
Sets the size of the nodes in the visualization
Numeric value
Right Label Offset X
Adjusts the horizontal position (offset) of the last layer labels
Numeric value
Label Widget
Defines the maximum width of labels ℹ️ If the text exceeds this value, it is truncated (e.g., “Tex…”)
Numeric value

TopX by Layer

⚠️

This section is only available when Grouping is enabled.

This setting limits the number of displayed items per layer. Each layer accepts a numeric value. If left empty, all items for that layer are displayed.

ℹ️

The number of available layers in this section is determined by the number of fields added to the From data panel.

If the number of items in a layer exceeds the defined limit, all additional items are grouped into a single category labeled: “Other” + [Layer Field Name]

Field
Description
Options
Layer x
Limits the number of displayed items in Layer x
Numeric value

Color by layer

Defines the display color for each layer using a color picker.

ℹ️

The number of available layers in this section is determined by the number of fields added to the From data panel.

Field
Description
Options
Layer x
Defines the display color for Layer x
HEX, RGB, HSL

Advanced Configuration

The Sankey Diagram uses a config.js file that allows Admins to perform additional configuration/customization.

To locate this file:

  1. Go to the Admin tab > App Configurations > File Management
  1. Continue to the plugins folder > QBeeQSankeyCharts folder > select the config.js file

You can edit the file's code directly in the user interface.

Setting
Description
Options
Example
tooltipFontFamily
Defines the font family used in the tooltip
tooltipFontFamily: "Open Sans"
tooltipFontSize
Sets the font size in pixels used in the tooltip
tooltipFontSize: "12px"
tooltipFontWeight
Controls the thickness of tooltip text
tooltipFontWeight: "500"
fontSize
Sets the size of the text in pixels displayed in the widget
fontSize: "20px"
fontWeight
Controls the thickness of the widget text
fontWeight: "600"
fontColor
Sets the color of the text in the widget
Text, HEX, RGB, HSL
fontColor: "blue"
 
Did this answer your question?
😞
😐
🤩

Last updated on August 6, 2021