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: