SankeyDiagramLinkLabel

New in version 5.0.10

SankeyDiagramLinkLabel ( sourceNodeID ;​ targetNodeID ;​ position ;​ text ;​ font ;​ size ;​ style ;​ color ;​ alignment ;​ orientation ;​ textWidthMax ;​ textHeightMax ;​ shadowEffect ;​ shadowColor )

Argument Type Range Default Note
sourceNodeID str 0..1000
targetNodeID str 0..1000
position num -10..10 0
text styt 0..1000
font str 0..1000 ApplFont
size num 0..1000 9
style int 0..7 plain
color rgba 0..255 black
alignment int 1..3 2
orientation num -360..360 0 Dimension:[deg]
textWidthMax num -1..10000 -1 -1...No limit
textHeightMax num -1..10000 -1 -1...No limit
shadowEffect num[] -1000..1000 0
shadowColor rgba 0..255 #888a
Examples

SankeyDiagramLinkLabel(;​;​0;​"{SOURCE_ID}-{TARGET_ID}\n|u|";​Arial;​10.5)

SankeyDiagramLinkLabel("A";​"Z";​1;​"|f2|";​Verdana;​12;​bold;​red)

SankeyDiagramLinkLabel(;​"X";​-0.95;​"|u|";​Arial;​12)

Description

By using the SankeyDiagramLinkLabel() function it is possible to add labels to links. Important: To display labels, set in function SankeyDiagram() the 1st argument appearanceConstants =​ label.

The arguments sourceNodeID and targetNodeID define which link the function refers to. If argument sourceNodeID is empty, then the function is applied to all links with the target node defined in argument targetNodeID. If argument targetNodeID is empty, then the function is applied to all links with the source node defined in argument sourceNodeID. If both arguments, sourceNodeID and targetNodeID are empty, then the function is applied to all links.

By using the 3rd argument position the position of the labels can be controlled.
position =​ –1: Labels are placed right of the source nodes.
position =​  0: Labels are placed in the middle of the links (default).
position =​  1: Labels are placed left of the target nodes.
Position values other than -1,0,1 can be used to customize the label positions, e.g. 1.05, -0.5, etc.

The label text can be controlled by the 4th argument text. The name of a source node or target node can be inserted by using the placeholders {SOURCE_ID} and {TARGET_ID}. Furthermore, by adding a format specifier, e.g. "|u|" or "|f1|" the value (weight) of a link will be shown. A detailed explanation of all format specifiers, including numerous examples, can be found in Numbers. Multi-line texts are possible by entering a line feed "\n". Examples:

All text style arguments are discussed in combination with the LabelStyle() function.

Please note that SankeyDiagramLinkLabel() should be listed after function SankeyDiagram() . This rule generally applies: Function SankeyDiagram() should always be listed first before other Sankey functions are called.

Scroll to Top