SankeyDiagram
TheSankeyDiagram component visualizes flows between nodes, making it ideal for showing how quantities move through different stages or categories. Common use cases include sales funnels, user flows, and resource allocation.
Props
Data Props
Query result or array of objects containing the flow data
Column name containing source node names
Column name containing target node names
Column name containing flow values
Column name containing percentage values for links
Formatting Props
Format string for value labels
Format string for percentage labels
Chart Layout Props
Chart title displayed at the top
Chart subtitle displayed below the title
Height of the chart area in pixels
Node Props
Node label display: ‘name’ | ‘value’ | ‘full’
- ‘name’: Show node name only
- ‘value’: Show value only
- ‘full’: Show both name and value
Node alignment: ‘justify’ | ‘left’ | ‘right’
Vertical gap between nodes in pixels
Width of nodes in pixels
Color for node outlines
Width of node outlines in pixels
Object mapping node names to depth levels (0-based):
{'nodeName': 1}Link Props
Link label display: ‘value’ | ‘percent’ | ‘full’ | undefined
- ‘value’: Show flow value
- ‘percent’: Show percentage
- ‘full’: Show both
- undefined: No labels (default)
Link color mode: ‘base-content-muted’ | ‘source’ | ‘target’ | ‘gradient’
Layout Props
Diagram orientation: ‘horizontal’ | ‘vertical’
Sort nodes automatically
Color Props
Color palette name or array of colors for nodes
Advanced Props
Custom ECharts configuration object
Print ECharts config to console
Empty data behavior: ‘pass’ | ‘warn’ | ‘error’
Custom empty data message