Skip to content
Lower pricing Individual licenses are now $49/year for Studio, $25 for Core — See pricing →

Sankey Diagram

Last updated:

Mermaid Studio provides language support for Sankey diagrams inside IntelliJ IDEA and other JetBrains IDEs. Sankey diagrams visualize flows between nodes where the arrow width represents the quantity or magnitude, which makes them a natural fit for showing energy transfers, budget allocations, or user journey flows.

Syntax highlighting integrates directly with IntelliJ’s color scheme system, so diagram colors always match your editor theme.

Sankey diagram syntax highlighting in Armada Dark theme

The summary below shows the IDE support Mermaid Studio ships for Sankey diagrams, grouped by capability.

IDE feature supportSelect a feature for its description.
Editing
Code Intelligence
Validation
Refactoring

References are resolved by order: the first occurrence of a node name is its declaration, and rename and find usages treat later occurrences as references to it.

Each line defines a flow with three comma-separated values:

Source,Target,Value
  • Source: The origin node name
  • Target: The destination node name
  • Value: The numeric flow quantity (determines arrow width)
sankey-beta
Source A,Target 1,100
Source A,Target 2,50
Source B,Target 2,75
Target 1,Final,100
Target 2,Final,125
  • Larger values create wider arrows
  • Nodes are automatically created when referenced
  • Flows can chain through intermediate nodes
  • Use descriptive node names for clarity

For full syntax details, see the Mermaid Sankey documentation.