Legend
configurationThe legend configuration options of the Sankey.
legend
Objectlegend.align
StringThe alignment of the legend. The supported values are:
- "start" - The legend is aligned to the start.
- "center" - The legend is aligned to the center.
- "end" - The legend is aligned to the end.
Default: "start"
legend.background
StringThe background color of the legend.
legend.border
ObjectThe border of the legend.
legend.height
NumberThe height of the legend.
legend.item
ObjectThe configuration of the legend items.
legend.labels
ObjectThe Sankey legend label configuration.
legend.margin
Number|ObjectThe margin of the Sankey legend. A numeric value will set all paddings.
Default: 5
legend.offsetX
NumberThe X offset of the Sankey legend. The offset is relative to the default position of the legend. For instance, a value of 20 will move the legend 20 pixels to the right of its initial position. A negative value will move the legend to the left of its current position.
Default: 0
legend.offsetY
NumberThe Y offset of the Sankey legend. The offset is relative to the current position of the legend. For instance, a value of 20 will move the legend 20 pixels down from its initial position. A negative value will move the legend upwards from its current position.
Default: 0
legend.orientation
StringThe orientation of the legend items.
The supported values are:
-
"vertical" - the legend items are added vertically.
-
"horizontal" - the legend items are added horizontally.
Default: "vertical"
legend.padding
Number|ObjectThe padding of the Sankey legend. A numeric value will set all paddings.
Default: 5
legend.position
StringThe positions of the Sankey legend.
The supported values are:
- "top" - the legend is positioned on the top.
- "bottom" - the legend is positioned on the bottom.
- "left" - the legend is positioned on the left.
- "right" - the legend is positioned on the right.
- "custom" - the legend is positioned using legend.offsetX and legend.offsetY.
Default: "right"
legend.reverse
BooleanIf set to true the legend items will be reversed.
Default: false
legend.spacing
NumberThe spacing between the labels in pixels when the legend.orientation is "horizontal".
legend.title
ObjectThe legend title configuration options.
legend.visible
BooleanIf set to false the Sankey will not display the legend.
Default: true
legend.width
NumberThe legend width when the legend.orientation is set to "horizontal".