ChordDiagramNodeLabel

New in version 5.0.11

ChordDiagramNodeLabel ( nodeID ;​ position ;​ text ;​ font ;​ size ;​ style ;​ color ;​ alignment ;​ textWidthMax ;​ textHeightMax ;​ shadowEffect ;​ shadowColor )

Argument Type Range Default Note
nodeID str 0..1000
position num -10..10 auto
text styt 0..1000
font str 0..1000 ApplFont
size num 0..1000 9
style int 0..7 0
color rgba 0..255 black
alignment int 1..3 2
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

ChordDiagramNodeLabel(;​auto;​"|u|";​Arial;​10.5)

ChordDiagramNodeLabel("A";​-1.05;​"{NODE_ID} |u|";​Verdana;​12;​bold;​red)

ChordDiagramNodeLabel("B";​auto;​"ID \"{NODE_ID}\"\n|u| (|f1|%)";​Arial;​12)

Description

The ChordDiagramNodeLabel() function can be used to add labels to nodes. Important: To display labels, set the first argument of the ChordDiagram() function to appearanceConstants =​ label.

The first argument, nodeID, specifies which node the function applies to. If the nodeID argument is empty, the function is applied to all nodes.
The second argument position can be used to control the position of the labels.
position =​ –1: Labels are placed outside the nodes.
position =​  0: Labels are centered on the nodes.
position =​  1: Labels are placed inside the nodes.
When position =​ auto (default), labels are centered on the nodes. Position values other than -1,0,1 can be used to customize the label positions, e.g. 1.1, -1.5, etc.

CHORD_DIAGRAM_NODE_LABEL_01
1

OpenDrawing(300;​200)

2

OpenChart(20;​10;​260;​180;​on)

3

ChordDiagram(label;​16;​4) /* Function ChordDiagram(...) is always listed first. */

4

ChordDiagramData(2;​"A" "X" 5;​ "A" "Y" 7;​ "A" "Z" 6;​ "B" "X" 2;​ "B" "Y" 9;​ "B" "Z" 4)

5

ChordDiagramLinkStyle(;​;​#AE210933)

6

ChordDiagramNodeStyle(;​darkRed)

7

ChordDiagramNodeLabel(;​1;​"{NODE_ID}")

8

ChordDiagramNodeLabel("A";​-1;​"{NODE_ID}")

9

ChordDiagramNodeLabel("B";​-1;​"{NODE_ID}")

10

CloseChart()

11

CloseDrawing()

CHORD_DIAGRAM_NODE_LABEL_01
CHORD_DIAGRAM_NODE_LABEL_02
1

OpenDrawing(600;​500)

2

ChordDiagram(label;​15;​0.5%;​2) /*¬†Function ChordDiagram(...) is always listed first.¬†*/

3

ChordDiagramOptions(0;​0;​0.6)

4

ChordDiagramData(2;​

5

"Brazil" "Portugal" 5;​ "Brazil" "France" 1;​ "Brazil" "Spain" 1;​ "Brazil" "England" 1;​ "Canada" "Portugal" 1;​ "Canada" "France" 5;​ "Canada" "England" 1;​ "Mexico" "Portugal" 1;​ "Mexico" "France" 1;​ "Mexico" "Spain" 5;​ "Mexico" "England" 1;​ "USA" "Portugal" 1;​ "USA" "France" 1;​ "USA" "Spain" 1;​ "USA" "England" 5;​ "Portugal" "Angola" 2;​ "Portugal" "Senegal" 1;​ "Portugal" "Morocco" 1;​ "Portugal" "South Africa" 3;​ "France" "Angola" 1;​ "France" "Senegal" 3;​ "France" "Mali" 3;​ "France" "Morocco" 3;​ "France" "South Africa" 1;​ "Spain" "Senegal" 1;​ "Spain" "Morocco" 3;​ "Spain" "South Africa" 1;​ "England" "Angola" 1;​ "England" "Senegal" 1;​ "England" "Morocco" 2;​ "England" "South Africa" 7;​ "South Africa" "China" 5;​ "South Africa" "India" 1;​ "South Africa" "Japan" 3;​ "Angola" "China" 5;​ "Angola" "India" 1;​ "Angola" "Japan" 3;​ "Senegal" "China" 5;​ "Senegal" "India" 1;​ "Senegal" "Japan" 3;​ "Mali" "China" 5;​ "Mali" "India" 1;​ "Mali" "Japan" 3;​ "Morocco" "China" 5;​ "Morocco" "India" 1;​ "Morocco" "Japan" 3)

6

ChordDiagramLinkStyle(;​;​#0002)

7

ChordDiagramNodeColorScheme(2)

8

ChordDiagramNodeLabel(;​0;​"{NODE_ID}";​Arial;​9.5;​bold;​white;​2)

9

CloseDrawing()

CHORD_DIAGRAM_NODE_LABEL_02

The label text can be specified with the 3rd argument text. The name of a node can be inserted using the placeholder {NODE_ID}. Furthermore, the value of a node, i.e. the sum of the link values, can be displayed by adding a format specifier, e.g. "|u|" or "|f1|". For a detailed explanation of all format specifiers, including numerous examples, see Numbers. It is also possible to display absolute values and percentage values at the same time. This is done by specifying two format specifiers. The first format specifier defines the format of the absolute values; the second format specifier defines the format of the percentage values. If only the percentage values are to be displayed, the output of the absolute values must be suppressed with an empty format specifier "||". Multi-line texts are possible by specifying a line feed "\n". Examples:

CHORD_DIAGRAM_NODE_LABEL_03
1

OpenDrawing(300;​300)

2

OpenChart(20;​20;​260;​260;​on)

3

ChordDiagram(label;​16;​4) /* Function ChordDiagram(...) is always listed first. */

4

ChordDiagramData(2;​"A" "X" 5;​ "A" "Y" 7;​ "A" "Z" 6;​ "B" "X" 2;​ "B" "Y" 9;​ "B" "Z" 4)

5

ChordDiagramLinkStyle(;​;​#AE210933)

6

ChordDiagramNodeStyle(;​darkRed)

7

ChordDiagramNodeLabel(;​1;​"{NODE_ID}: |u|")

8

ChordDiagramNodeLabel("A";​-1;​"{NODE_ID}: |u|")

9

ChordDiagramNodeLabel("B";​-1;​"{NODE_ID}: |u|")

10

CloseChart()

11

CloseDrawing()

CHORD_DIAGRAM_NODE_LABEL_03
CHORD_DIAGRAM_NODE_LABEL_04
1

OpenDrawing(300;​300)

2

OpenChart(20;​20;​260;​260;​on)

3

ChordDiagram(label;​16;​4) /* Function ChordDiagram(...) is always listed first. */

4

ChordDiagramData(2;​"A" "X" 5;​ "A" "Y" 7;​ "A" "Z" 6;​ "B" "X" 2;​ "B" "Y" 9;​ "B" "Z" 4)

5

ChordDiagramLinkStyle(;​;​#AE210933)

6

ChordDiagramNodeStyle(;​darkRed)

7

ChordDiagramNodeLabel(;​1;​"{NODE_ID}\n||(|f1|%)")

8

ChordDiagramNodeLabel("A";​-1;​"{NODE_ID}\n||(|f1|%)")

9

ChordDiagramNodeLabel("B";​-1;​"{NODE_ID}\n||(|f1|%)")

10

CloseChart()

11

CloseDrawing()

CHORD_DIAGRAM_NODE_LABEL_04

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

Note that ChordDiagramNodeLabel() should be listed after the ChordDiagram() function. This rule generally applies: The ChordDiagram() function should always be listed first, before other chord functions are called.

Scroll to Top