SankeyChart
Sankey diagram component
Source
LLM docs
Docs
Package
Usage
SankeyChart is based on the Sankey recharts component.
It visualizes flow between nodes where the width of each link is proportional to the flow value:
Node color
You can set color on each node in the data to control individual node colors.
Colors can reference theme values like blue, red.5, orange.7, etc.
Any valid CSS color value is also accepted.
Custom colors
Use colors prop to provide an array of colors that are used for nodes when no
color is set on individual nodes. Colors can reference theme values.
The colors cycle when there are more nodes than colors:
Node width and padding
Use nodeWidth to control the width of each node and nodePadding to control
the spacing between nodes:
Link opacity
Use linkOpacity prop to control the opacity of links between nodes:
Disable tooltip
To disable the tooltip, set withTooltip={false}: