Skip to main content

Sankey Diagram

Overview

Sankey A Sankey diagram is a type of data visualization where information is represented as objects (nodes) connected by lines of varying widths. Sankey diagrams are commonly used to display business processes. They show key steps and the intensity of flow at each stage.

Sankey Settings

General

The General tab contains settings that allow you to configure the main parameters of the Sankey diagram.

ParameterDescriptionJSON Field
"From" Field FieldText field to specify the field name that will display the source nodes.general.fromFieldName
"To" Node FieldText field to specify the field name that will display the target nodes.general.toFieldName
"Value" Field NameText field to specify the field name that determines the width of the connection between nodes.general.valueFieldName
Sort BySelector to choose the sorting type for nodes. Three options are available: None, Name, Valuegeneral.sortBy
OrientationThe name of the field that determines the width of the connection between nodes.general.orientation

The settings interface in the SAF system looks like this:

Nodes

The Nodes tab contains the node display settings.

ParameterDescriptionJSON Field
Width, pxText field to set the node width value.nodes.width
Stroke ColorColor selector to choose the node outline color. Relevant when stroke width > 0.nodes.stroke
Stroke Width, pxNumber input field to set the node outline width.nodes.strokeWidth
Label Offset, pxNumber input field to set the offset of node labels relative to the nodes themselves.nodes.nameLabelLocationX
Label ColorColor selector to choose the color of node labels.nodes.nameLabelFill
Font WeightNumber input field to set the font weight of node labels.nodes.nameLabelFontWeight
ClickableToggle switch to enable or disable hiding nodes by clicking on them.nodes.clickable
DraggableToggle switch to enable or disable dragging nodes.nodes.draggable

The settings interface in the SAF system looks like this:

The Links tab contains the link display settings.

ParameterDescriptionJSON Field
CurvatureNumber input field to set the curvature value of the links.links.tension
Control PointNumber input field to set the distance of the straight part of the link to the bend of this link between two nodes.links.controlPointDistance
Fill ModeSelector to choose one of the fill modes. Available options: Source Node Color, Target Node Color, Solid Color, Gradientlinks.colorMode
Fill ColorColor selector to choose the link color.links.fill
Fill OpacityNumber input field to set the link transparency.links.fillOpacity

The settings interface in the SAF system looks like this:

Position

The Position tab contains the diagram position settings.

ParameterDescriptionJSON Field
Right Padding, pxNumber input field to set the right padding of the diagram.position.paddingRight
Left Padding, pxNumber input field to set the left padding of the diagram.position.paddingLeft
Top Padding, pxNumber input field to set the top padding of the diagram.position.paddingTop
Bottom Padding, pxNumber input field to set the bottom padding of the diagram.position.paddingBottom
Node AlignmentToggle switch to select the diagram alignment. Available options: Left, Right, Center, Justifyposition.nodeAlign

The settings interface in the SAF system looks like this:

Theme

In the Theme tab, you can choose one of the predefined color schemes. The default theme is "Smart Monitor". The general list of themes is shown below:

  • Smart Monitor
  • Material
  • Dataviz
  • Kelly's
  • Frozen
  • Moonrise Kingdom
  • Spirited Away
  • Amcharts

Creating a Sankey Diagram

Creating a Sankey diagram is possible with a query that returns a transition matrix between nodes with numerical transition values.

For example, the results of a query that returns data with suitable values:

source sankey-diagram-test1 | table from, to, value

will return the following result:

alt text

After that, by switching to the Visualization tab, you can select the Sankey visualization type and add it to the desired dashboard by clicking the Add to Dashboard button.

Sankey on the search page

After that, the diagram can be immediately used on the dashboard by clicking the "Add to Dashboard" button.