SankeyDiagramLinkStyle
New in version 5.0.10
SankeyDiagramLinkStyle ( sourceNodeID ; targetNodeID ; color ; colorVariant )
Argument | Type | Range | Default | Note |
---|---|---|---|---|
sourceNodeID | str | 0..1000 | ||
targetNodeID | str | 0..1000 | ||
color | rgba | 0..255 | #8886 | |
colorVariant | int | -1..0 | 0 |
Examples
SankeyDiagramLinkStyle(;;lightGray)
SankeyDiagramLinkStyle(;;#0f02)
SankeyDiagramLinkStyle("A";"M";darkYellow;-1)
Description
By using the function SankeyDiagramLinkStyle(), the appearance of individual links can be controlled. 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. The appearance can be varied by using the arguments color and colorVariant.
| SANKEY_DIAGRAM_LINK_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 | SankeyDiagramLinkStyle(;;#a004) |
5 | SankeyDiagramNodeStyle(;darkRed) |
6 | SankeyDiagramNodeLabel(;auto;"{NODE_ID}") |
7 |
| SANKEY_DIAGRAM_LINK_STYLE_02 |
1 | OpenDrawing(600;300) |
2 | SankeyDiagram(label;12;5;2) /* Function SankeyDiagram(...) is always listed first. */ |
3 | SankeyDiagramOptions(0;0;;0.6) |
4 | |
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 | SankeyDiagramLinkStyle(;;#0002) |
7 | SankeyDiagramLinkStyle(;"China";#694B8777) |
8 | |
9 | SankeyDiagramNodeLabel(;auto;"{NODE_ID}") |
10 |
| SANKEY_DIAGRAM_LINK_STYLE_03 |
1 | OpenDrawing(600;300) |
2 | SankeyDiagram(label;12;5;2) /* Function SankeyDiagram(...) is always listed first. */ |
3 | SankeyDiagramOptions(0;0;;0.6) |
4 | |
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 | SankeyDiagramLinkStyle(;;#0002) |
7 | SankeyDiagramLinkStyle("USA";"England";#EB431C66) |
8 | SankeyDiagramLinkStyle("England";"South Africa";#2599DB44) |
9 | |
10 | SankeyDiagramNodeLabel(;auto;"{NODE_ID}") |
11 |
Function SankeyDiagramLinkColorScheme() can be customized by using the corresponding SankeyDiagramLinkStyle() function. The color scheme function should be listed before the style function(s).
| SANKEY_DIAGRAM_LINK_STYLE_04 |
1 | OpenDrawing(600;300) |
2 | SankeyDiagram(label;12;5;2) /* Function SankeyDiagram(...) is always listed first. */ |
3 | SankeyDiagramOptions(0;0;;0.6) |
4 | |
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 | SankeyDiagramLinkColorScheme(1;0.18) |
7 | SankeyDiagramLinkStyle(;"Japan";#81A94FAA) |
8 | |
9 | SankeyDiagramNodeLabel(;auto;"{NODE_ID}") |
10 |
Please note that SankeyDiagramLinkStyle() should be listed after function SankeyDiagram() . This rule generally applies: Function SankeyDiagram() should always be listed first before other Sankey functions are called.