IsmaelMasharo / sankey-panel

Sankey chart panel for Grafana using d3
MIT License
1 stars 3 forks source link
grafana grafana-panel-plugin sankey

Grafana Sankey Panel

Sankey diagram implementation for directed flow visualization between nodes in an acyclic network.

sankey-panel

Installing

Using the grafana-cli:

grafana-cli --pluginUrl https://github.com/IsmaelMasharo/sankey-panel/raw/master/sankey-panel.zip plugins install sankey-panel

Grafana Version

Tested on Grafana 7.3.1

Required Fields

The diagram gets constructed from a data source formatted as table with 3 mandatory fields: source (text), target (text), value (numeric, no nulls). The diagram at the beginning was created with the following table format:

source target value
A D 2
B D 2
B E 2
A F 2
D E 2
D F 3
E F 4
C D 1
C E 1
E G 1

Being an acyclic implementation of the Sankey diagram loops are not allowed:

source target value
A B 2
B A (x) 2

To avoid circular link error a masked prefix could be set on the target values:

source target value
A B 2
B P-A 2

Display Options

There are 5 options for displaying the diagram: Alignment, Color, Edge Color, Display Values, Highlight Connections

Alignment

Arranges the nodes to one of the following sides: Left, Right, Center, Justify. See d3 sankey nodeAlign for image reference.

Color

Nodes and links color. Based on d3 categorical schemes.

Edge Color

Represents the link's color transition from source to the target node.

Display Values

Values are shown next to the node name.

Highlight Connections

Boolean. Highlights links and nodes with a direct connection to the hovered node.