SANKEY

Overview

sankey

Sankey diagrams are a type of flow diagram in which the width of the arrows is proportional to the flow rate. Sankey diagrams can also visualize the energy accounts, material flow accounts on a regional or national level, and cost breakdowns. The diagrams are often used in the visualization of material flow analysis.

If a user configures the component by choosing the props:

  • nodes for "Nodes", a simple array of strings
  • links for "Links", an array of objects

then upon receiving the following message:

  msg.payload = {
      "nodes": ["John", "Raoul", "Jane", "Marcel", "Ibrahim", "Junko"],

      "links": [
          {
              "source": "Raoul",
              "target": "Ibrahim",
              "value": 165
          },
          {
              "source": "Raoul",
              "target": "Junko",
              "value": 22
          } // etc...
      ]
  }
}
return msg;

the diagram is displayed. If another message arrives redefining the nodes or the links or both, the diagram updates.

Was this article helpful?

Powered by Zendesk