ChordDiagramOptions
New in version 5.0.11
ChordDiagramOptions ( orientation ; startAngle ; curveFactor )
Argument | Type | Range | Default | Note |
---|---|---|---|---|
orientation | int | 0..1 | 0 | 1...counterclockwise |
startAngle | num | -360..360 | 0 | |
curveFactor | num | 0..1 | 0.5 |
Examples
Description
The first argument orientation can be used to set the drawing direction of the nodes. If the orientation is 0 (default), the nodes are drawn clockwise; if the orientation is 1, the nodes are drawn counterclockwise.
The second argument startAngle can be used to define the position of the first node. The start angle must be specified within a range of ±360 degrees; startAngle = 0 degrees is at the top (12 o'clock), startAngle = 90 degrees is at the right (3 o'clock), and startAngle = –90 degrees is at the left (9 o'clock). The 3rd argument curveFactor can be used to control the curvature of the links with a value between 0 and 1. A value of 0 results in straight links.
| CHORD_DIAGRAM_OPTIONS_01 |
1 | OpenDrawing(600;450) |
2 | ChordDiagram(label;14;6;2) /* Function ChordDiagram(...) is always listed first. */ |
3 | ChordDiagramOptions(0;90;0.6) /* Curve factor = 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 | |
7 | ChordDiagramNodeLabel(;-1;"{NODE_ID}") |
8 |
| CHORD_DIAGRAM_OPTIONS_02 |
1 | OpenDrawing(300;200) |
2 | ChordDiagram(label;9%) /* Function ChordDiagram(...) is always listed first. */ |
3 | ChordDiagramOptions(;;0) /* Curve factor = 0 */ |
4 | ChordDiagramData(2;"A" "X" 5; "A" "Y" 7; "A" "Z" 6; "B" "X" 2; "B" "Y" 9; "B" "Z" 4) |
5 | ChordDiagramNodeLabel(;auto;"{NODE_ID}") |
6 |
Note that ChordDiagramOptions() 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.