JavaScript/jQuery Sankey - Tooltip

import { Tooltip } from "devextreme/viz/sankey"

customizeLinkTooltip

Customizes link tooltips' appearance.

Type:

Function

Function parameters:
info:

Object

Information about a sankey link being pressed or hovered over.

Object structure:
Name Type Description
source

String

The title of the link's source node.

target

String

The title of the link's target node.

weight

Number

The link's weight.

Return Value:

Object

The current tooltip's text or markup and appearance settings.

Default Value: undefined

customizeNodeTooltip

Customizes node tooltips' appearance.

Type:

Function

Function parameters:
info:

Object

Information about a sankey node being pressed or hovered over.

Object structure:
Name Type Description
label

String

The node's label.

title

String

Use 'label' instead.

The node's label.

weightIn

Number

The total weight of the node's incoming links.

weightOut

Number

The total weight of the node's outgoing links.

Return Value:

Object

The tooltip's text or markup and appearance settings.

Default Value: undefined

enabled

Specifies whether the tooltip is enabled.

Type:

Boolean

Default Value: true

linkTooltipTemplate

Specifies a custom template for a link's tooltip.

Type:

template

Template Data:
Name Type Description
source

String

The label of the link's source node.

target

String

The label of the link's target node.

weight

Number

The link's weight.

Default Name: undefined

nodeTooltipTemplate

Specifies a custom template for a node's tooltip.

Type:

template

Template Data:
Name Type Description
label

String

The node's label.

weightIn

Number

The total weight of the node's incoming links.

weightOut

Number

The total weight of the node's outgoing links.

Default Name: undefined