A Sankey diagram is a chart used to visualize the flow of resources such as energy, money, or materials between different nodes. It uses bandwidth to represent flow magnitude, with nodes and flow lines intuitively showing the direction and distribution of each part. It is commonly used in energy flow, fund flow, user path analysis, and other scenarios.
Global energy flow from primary sources to end use.
User behavior path analysis from homepage to payment completion, custom colors
Supply chain fund flow from raw materials to consumers, custom palette
| Property | Type | Required | Description |
|---|---|---|---|
| type | string | required | Value must be "sankey". |
| data | Object[] | required | Sankey diagram data. |
| data.source | string | required | Source node name. |
| data.target | string | required | Target node name. |
| data.value | number | required | Flow value. |
| nodeAlign | 'left' | 'center' | 'right' | 'justify' | optional | Node alignment, default is "center". |
| title | string | optional | Chart title. |
| theme | 'default' | 'dark' | 'academy' | optional | Chart theme, default is "default". |
| style | Object | optional | Chart style. |
| style.palette | string[] | optional | Must be an array of valid color values. |
| style.backgroundColor | string | optional | Must be a valid color value. |