Props
object
required
The source data, including the array of nodes, and the relationships, represented by links. Each node should have a unique index in the nodes array, and each link should reference these nodes by their indices.
number | string
The width of chart container. Can be a number or a percent string like “100%”.
number | string
The height of chart container. Can be a number or a percent string like “100%”.
object
default:"{top: 5, right: 5, bottom: 5, left: 5}"
Empty space around the container.
number
default:"10"
The width of node.
number
default:"10"
The padding between the nodes.
number
default:"0.5"
The curvature of width.
number
default:"32"
The number of the iterations between the links.
ReactElement | function | object
If set an object, the option is the configuration of nodes. If set a React element, the option is the custom react element of drawing the nodes.
ReactElement | function | object
If set an object, the option is the configuration of links. If set a React element, the option is the custom react element of drawing the links.
boolean
default:"true"
Whether to sort the nodes on the y axis, or to display them as user-defined.
'justify' | 'top'
default:"'justify'"
Controls the vertical spacing of nodes within a depth. ‘justify’ distributes nodes evenly and balances link paths, while ‘top’ positions the group starting from the top edge of the chart.
'left' | 'justify'
default:"'justify'"
If set to ‘justify’, the start nodes will be aligned to the left edge of the chart and the end nodes will be aligned to the right edge of the chart. If set to ‘left’, the start nodes will be aligned to the left edge of the chart.
string | number | function
default:"'name'"
Name represents each sector in the tooltip. Can be a string key name, number index, or function.
string | number | function
default:"'value'"
dataKey prop in Sankey defines which key in the link objects represents the value of the link in Tooltip only.
function
The customized event handler of click on the area in this group.
function
The customized event handler of mouseenter on the area in this group.
function
The customized event handler of mouseleave on the area in this group.
string
CSS class name for the chart container.
CSSProperties
Inline CSS styles for the chart container.
string
The unique id of chart.
number | 'raf'
default:"'raf'"
Decides the time interval to throttle events.