All docs
V18.2
24.2
The page you are viewing does not exist in version 24.2.
24.1
The page you are viewing does not exist in version 24.1.
23.2
The page you are viewing does not exist in version 23.2.
23.1
The page you are viewing does not exist in version 23.1.
22.2
The page you are viewing does not exist in version 22.2.
22.1
The page you are viewing does not exist in version 22.1.
21.2
The page you are viewing does not exist in version 21.2.
21.1
The page you are viewing does not exist in version 21.1.
20.2
The page you are viewing does not exist in version 20.2.
20.1
The page you are viewing does not exist in version 20.1.
19.2
19.1
18.2
18.1
The page you are viewing does not exist in version 18.1.
17.2
The page you are viewing does not exist in version 17.2.
A newer version of this page is available. Switch to the current version.

JavaScript/jQuery Sankey - label

Configures sankey nodes' labels.

Type:

Object

border

Configures the labels' borders.

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 options.

Type:

Object

horizontalOffset

Moves the labels horizontally from their initial positions.

Type:

Number

Default Value: 5

The number assigned to this option 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 option 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.

Use the SankeyLabelOverlappingBehavior enum to specify this option when the widget is used as an ASP.NET MVC Control. This enum accepts the following values: Ellipsis, Hide, and None.

shadow

Configures the labels' shadows.

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 option 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