React Sankey - label

Configures sankey nodes' labels.

Selector: Label
Type:

Object

border

Configures the labels' borders.

Selector: Border
Type:

Object

customizeText

Customizes the labels' texts.

Type:

Function

Function parameters:
itemInfo:

Node

The Node object.

Return Value:

String

The text to be displayed in a label.

Cannot be used in themes.

NOTE
The this keyword refers to the current label.

font

Specifies the labels' font properties.

Selector: Font
Type:

Object

horizontalOffset

Moves the labels horizontally from their initial positions.

Type:

Number

Default Value: 5

The number assigned to this property specifies the shift in pixels. A negative number shifts the labels to the left, a positive number - to the right.

overlappingBehavior

Specifies how to arrange labels when there is insufficient space to display them all.

Type:

String

Default Value: 'ellipsis'
Accepted Values: 'ellipsis' | 'hide' | 'none'

You can set this property to rearrange two overlapping labels. It accepts the following values:

  • "ellipsis"
    Adds ellipsis to one label to leave more space for the other.

  • "hide"
    Hides one label.

  • "none"
    Leaves labels overlapped.

shadow

Configures the labels' shadows.

Selector: Shadow
Type:

Object

useNodeColors

Specifies whether to color labels in the nodes' colors.

Type:

Boolean

Default Value: false

verticalOffset

Moves the labels vertically from their initial positions.

Type:

Number

Default Value: 0

The number assigned to this property specifies the shift in pixels. A negative number shifts the labels to the top, a positive number - to the bottom.

visible

Specifies whether the labels are visible.

Type:

Boolean

Default Value: true