A Sankey diagram is a visualization used to depict a flow from one set of values to another. The things being connected are called nodes and the connections are called links.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/mermaid-js/mermaid/llms.txt
Use this file to discover all available pages before exploring further.
Sankey diagrams are experimental. The syntax is very close to plain CSV and may be extended in the future.
Basic example
Syntax overview
The syntax is simple: typesankey keyword first, then paste CSV data below:
- CSV must contain exactly 3 columns
- Empty lines without comma separators are allowed
Basic format
The three columns representsource, target, and value:
Empty lines
You can add empty lines for visual organization:Commas in labels
Wrap labels containing commas in double quotes:Double quotes in labels
Use two double quotes to include a double quote character:Configuration
Link colors
Link colors
Customize link colors with the
linkColor option:source- Link uses source node colortarget- Link uses target node colorgradient- Smooth transition between source and target colors- Hex code - Specific color like
#a1a1a1
Node alignment
Node alignment
Control graph layout with the
nodeAlignment option:justify(default)centerleftright
Dimensions
Dimensions
Customize diagram size: