SankeyDiagramNodeStyle

New in version 5.0.10

SankeyDiagramNodeStyle ( nodeID ;​ fillColor ;​ fillColorVariant ;​ borderStroke ;​ borderColor ;​ borderColorVariant )

Argument Type Range Default Note
nodeID str 0..1000
fillColor rgba 0..255 #888
fillColorVariant int -1..0 solid
borderStroke num[] 0..1000 0 Dimension:[pt]
borderColor rgba 0..255 black
borderColorVariant int -1..0 solid
Examples

SankeyDiagramNodeStyle(;​darkGreen;​shaded)

SankeyDiagramNodeStyle(;​teal;​;​1;​green)

SankeyDiagramNodeStyle("A";​red;​solid;​1;​gray)

Description

By using the SankeyDiagramNodeStyle() function, the appearance of individual nodes can be controlled. The 1st argument nodeID defines which node the function refers to. If argument nodeID is empty, then the function is applied to all nodes. The appearance can be varied by using the arguments fillColor, fillColorVariant, borderStroke, borderColor and borderColorVariant.

SANKEY_DIAGRAM_NODE_STYLE_01
1

OpenDrawing(300;​200)

2

SankeyDiagram(label;​16;​3;​1%) /* Function SankeyDiagram(...) is always listed first. */

3

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

4

SankeyDiagramNodeStyle(;​darkRed)

5

SankeyDiagramNodeLabel(;​auto;​"{NODE_ID}")

6

CloseDrawing()

SANKEY_DIAGRAM_NODE_STYLE_01
SANKEY_DIAGRAM_NODE_STYLE_02
1

OpenDrawing(300;​200)

2

SankeyDiagram(label;​16;​3;​1%) /* Function SankeyDiagram(...) is always listed first. */

3

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

4

SankeyDiagramNodeStyle("";​#c005;​)

5

SankeyDiagramNodeStyle("A";​red)

6

SankeyDiagramNodeLabel(;​auto;​"{NODE_ID}")

7

CloseDrawing()

SANKEY_DIAGRAM_NODE_STYLE_02

Function SankeyDiagramNodeColorScheme() can be customized by using the corresponding SankeyDiagramNodeStyle() function. The color scheme function should be listed before the style function(s).

SANKEY_DIAGRAM_NODE_STYLE_03
1

OpenDrawing(600;​300)

2

SankeyDiagram(label;​12;​5) /* Function SankeyDiagram(...) is always listed first. */

3

SankeyDiagramOptions(0;​0;​;​0.6)

4

SankeyDiagramData(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

SankeyDiagramNodeColorScheme(5;​solid;​0.7;​1;​darkGray)

7

SankeyDiagramNodeStyle("China";​red;​solid;​1;​darkGray) /* After SankeyDiagramNodeColorScheme() */

8

SankeyDiagramNodeStyle("Japan";​red;​solid;​1;​darkGray) /* After SankeyDiagramNodeColorScheme() */

9

SankeyDiagramNodeStyle("India";​red;​solid;​1;​darkGray) /* After SankeyDiagramNodeColorScheme() */

10

SankeyDiagramNodeLabel(;​auto;​"{NODE_ID}")

11

CloseDrawing()

SANKEY_DIAGRAM_NODE_STYLE_03

Please note that SankeyDiagramNodeStyle() 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