Documentation Vision Library+ Documentation

Sankey+

Sankey+ draws the flows between the stages of a process as bands whose width follows the value. Use it to see at a glance where a total comes from, where it goes, and how much each path carries.

Overview

Sankey+ showing crude receipts and shipments at a terminal, with every flow in kg/s

Watch the demo

See Sankey+ in a practical PI Vision workflow.

When to use it

Use Sankey+ when you need to:

  • Show how a total is split between consumers, such as energy, water, or material.
  • Compare the size of several flows in one picture.
  • Combine live process values with fixed reference flows that have no data source.
  • Find where a balance gains or loses something, because a node that takes in more than it passes on stands out.

Choose Pie Chart+ when you only need the share of each part in one total, with no stages between source and destination.

Before you begin

  • Prepare one numeric PI Point or AF attribute for each live flow, all in the same unit. The band width is the plain number. Sankey+ does not convert units.
  • Decide the nodes of the diagram and, for every flow, the node it starts at and the node it ends at.
  • Plan a network without loops. A flow that would close a loop is not drawn.

Add and set up the symbol

  1. Select Sankey+ in the PI Vision symbol gallery.
  2. Drag the numeric data sources onto the display together. Each data source becomes one flow.
  3. Right-click the symbol and select Configure Sankey.
  4. In the Nodes section, select + once for each node of the diagram. Enter its Name.
  5. In the Flow Options section, select the first flow. Set Start and End to its nodes.
  6. Repeat step 5 for every flow, then click an empty part of the display.

The symbol draws one band per flow, and each node is as tall as the flows through it.

Sankey+ with three flows between four nodes

Common tasks

Connect a data source to its nodes

Use this when a flow is missing from the diagram or runs between the wrong nodes.

  1. Right-click the symbol and select Configure Sankey.
  2. In the Flow Options section, select the data source in the list (1).
  3. Set Start (2) to the node the flow leaves.
  4. Set End (3) to the node the flow enters.
  5. Optionally set Label to a name for the flow, and Value Type to Average, Maximum, or another statistic over the display time range instead of the current value.
Flow Options with a data source selected and its Start and End nodes marked

The band appears between the two nodes with its width following the value. A flow whose Start or End is empty is not drawn.

Add a fixed flow

Use this for a flow that has no data source, such as a contract value or a figure from a meter that is not in PI.

  1. In the configuration pane, open the Static Flows section.
  2. Select + (1) to add a flow.
  3. Enter the Name (2) and the Value (3).
  4. In Units (4), select the unit to print after the value.
  5. Set Start (5) and End (6) to the nodes the flow connects.
  6. Set Color, and set Label to ON to show the flow label.
Static Flows section with a fixed flow selected and its settings marked

The fixed flow joins the live flows. In the first image of this article, the Supplier delivery and the two bands that leave Tank farm are fixed flows. A new fixed flow has no color and no label until you set them. The value is shown as you typed it and does not follow the number format.

Color the flows

Use this when the bands should read as a family, or when a flow must keep one fixed color.

  1. In the configuration pane, open the Trend Options section and then the Flows group.
  2. Set Color (1) to Node to color the bands from the nodes, or to Flow to use the color of each data source.
  3. For Node, set Type (2) to Source, Target, or Gradient.
  4. Drag Opacity (3) to make the bands more or less transparent.
  5. For Flow, select a data source in Flow Options and set Color to Custom, or select the multi-state button next to it to color the flow by value.
Flows group with the Node color source and the Gradient type marked

With Gradient, each band fades from the color of its start node to the color of its end node. Fixed flows keep the color you gave them.

Flows colored as a gradient between their nodes

Show names, values, and direction on the flows

Use this when readers need the numbers on the diagram or must know which way a flow runs.

  1. In the configuration pane, open the Data Labels group.
  2. Under Nodes, switch Name (1) and Value on or off. Select the unit in Units (2).
  3. Under Flows, set Direction (3) to ON to draw an arrow on each flow.
  4. Set Name (4) to ON to show the flow name above its value.
  5. Optionally set the node label Position to Top, so that node labels stay clear of the flow labels.
Data Labels group with node and flow label settings marked

Each flow now shows an arrow, its name, and its value with the unit of its data source. To hide the label of a single flow, select it in Flow Options or Static Flows and set its Label to OFF.

Sankey+ with flow names, values, and direction arrows

Tidy the layout

Use this when nodes crowd each other, or when the diagram should line up toward its targets.

  1. In the configuration pane, open the Nodes group.
  2. Keep Position on Auto and set Alignment (1) to Left, Right, or Auto.
  3. Drag Width (2) to change the thickness of every node.
  4. Drag Distance (3) to change the space between nodes in a column.
Nodes group with Alignment, Width, and Distance marked

With Right, each node moves toward the column of the node it feeds, so Terminal 1 and Supplier sit next to Tank farm and not at the far left. To place nodes by hand, set Position to Custom, select a node in the Nodes section, and use the arrow buttons under Node Position to move it by column (X) and row (Y).

Sankey+ with right alignment, wider nodes, and tighter spacing

Use the symbol

Sankey+ with numbered callouts
What it shows
(1)The title.
(2)A node. Its height is the larger of the flow into it and the flow out of it, and its label shows the name and value.
(3)A flow. The band width is its value.
(4)A flow label with the value and the unit of the data source, plus the name and a direction arrow when they are on.
(5)The tooltip of the flow under the pointer: start node, end node, flow name, and value. A node tooltip shows its name and value.
(6)The toolbar with Fullscreen and Download.
  • Hover a flow or node to see its tooltip.
  • Click a live flow to open a Quick Trend of its data source over the display time range. A fixed flow has no data source and opens nothing.
  • Fullscreen shows the same diagram in a larger window without loading data again.
  • Download exports the diagram as PNG, SVG, or PDF, or the flows as CSV, JSON, or XLSX. A data export has one row per flow, live flows first, with Source, Target, Flow, Value, and Units. If your administrator disables data exports, only the image formats are offered.
  • Toolbar: by default it appears when the pointer enters the symbol. Under Toolbar, set Reveal to Always to keep it visible.
  • Balance: when a node takes in more than it passes on, or the other way around, it is as tall as the larger side and the smaller side leaves a gap. A balance that does not close shows up as a node taller than its outgoing bands.
  • No data: a flow whose data source has no good value is drawn with width 0 and shows its state, such as No Data, in its label.
  • The symbol only displays data. It does not write to the PI System or change other symbols.

Configure the symbol

Right-click the symbol and select Configure Sankey. The pane has these sections: Trend Options with six groups, then Nodes, Flow Options, Static Flows, and Numbers.

Title

SettingWhat it does
Title, subtitleShow or hide each heading and set its text, size, and alignment.

Style

SettingWhat it does
ThemeSelects the color theme, the surface (Flat or Gradient), and the container style. Custom Theme adds Foreground and Background colors.
Font SizeSets the size of the chart text.
OrientationHorizontal flows from left to right. Vertical flows from top to bottom.

Flows

SettingWhat it does
ColorNode colors the bands from the nodes. Flow uses the color of each data source. Used in Color the flows.
TypeSource, Target, or Gradient node color. Available when Color is Node.
Opacity, CurveSet the transparency of the bands and how strongly they bend.

Nodes

SettingWhat it does
PositionAuto places the nodes by the flows. Custom uses the Node Position of each node.
AlignmentAuto spreads the columns over the width. Left and Right pack nodes toward the start or the end of their flows. Available when Position is Auto. Used in Tidy the layout.
Width, DistanceSet the node thickness and the space between nodes in a column.

Data Labels

SettingWhat it does
Show, Name, Value (Nodes)Show or hide all node labels and choose what they contain. Used in Show names, values, and direction on the flows.
Background, Font SizeAdd a badge behind node labels and set their text size.
UnitsAdds a unit after the node value. It is text only and converts nothing. Available when Value is on.
PositionPlaces node labels Left, Right, Inside, Top, or Bottom of the node.
HeightAuto sizes every node label. Custom lets you set a height per node under Nodes.
Show (Flows)Shows or hides all flow labels.
Direction, TypeDraw an arrow on each flow. All marks every flow, Backward only flows that run against the layout.
Name, Value (Flows)Choose what a flow label contains.
Color, Opacity, BorderSet the fill, transparency, and outline of the flow labels.

Toolbar

SettingWhat it does
ShowTurns the toolbar on or off. With it off, no space is reserved for it.
RevealOn Hover shows the toolbar when the pointer or keyboard focus enters the symbol. Always keeps it visible and reserves a band at the top so it never covers a flow.

Nodes section

SettingWhat it does
Node listLists the nodes. + adds a node, the other buttons reorder or delete it.
Name, ColorSet the name and the color of the selected node.
LabelShows or hides the label of this node. Available when node labels are on.
HeightSets the label height of this node. Available when Height under Data Labels is Custom.
Node PositionMoves the node by column (X) and row (Y) with the arrow buttons. Used when Position is Custom.

Flow Options section

SettingWhat it does
Data source listLists the flows. Use the buttons below it to reorder or remove a flow.
LabelSelects the name shown for the flow, or lets you enter your own.
Value TypeValue uses the value at the display time. Average, Maximum, Minimum, StdDev, pStdDev, and Range use a statistic over the display time range.
Start, EndThe nodes the flow leaves and enters. Used in Connect a data source to its nodes.
ColorCustom uses one color. The multi-state button colors the flow by value; configure the states with the multi-state option of the symbol. Available when Color under Flows is Flow.
LabelShows or hides the label of this flow. Available when flow labels are on.

Static Flows section

SettingWhat it does
Flow listLists the fixed flows. + adds a flow, the copy button duplicates the selected one.
Name, Value, UnitsName, constant value, and the unit printed after it.
Start, End, Color, LabelThe connected nodes, the band color, and the flow label. Used in Add a fixed flow.

Numbers

SettingWhat it does
Number formatSets the number of decimals and the format of live flow values and node values.

Troubleshooting and limitations

SymptomCauseWhat to do
A flow is missing.Its Start or End is empty, or it would close a loop. A loop shows the warning "Cycle detected in the Sankey diagram".Set both nodes in Flow Options or Static Flows, and remove the flow that closes the loop.
A flow has no width.Its data source has no good value, so the symbol draws it as 0.Check the data source in PI Vision. The flow label shows the state.
Band widths look wrong.The data sources use different units, or Value Type is a statistic.Use data sources with one unit, and check Value Type for each flow.
A node is taller than the bands that leave it.The node takes in more than it passes on.Check the flows for a missing outlet or a loss that you have not drawn.
Nodes overlap or crowd.The symbol is small for the number of nodes.Increase Distance, reduce Width, or enlarge the symbol.
Labels overlap.Many flows meet in a small area.Set the node label Position to Top, turn off Name for flows, or turn off the label of single flows.
A fixed flow is gray and has no label.It has no Color and Label is OFF.Set both in Static Flows.

Limitation: Sankey+ does not support loops. A flow that would close one is left out.

Limitation: The band width is the plain number of the value. Sankey+ does not convert units and does not check that flows balance.