PieChartAuxLines
PieChartAuxLines ( horizontalLength ; extensionLength ; vAlignment ; stroke ; color ; colorVariant )
Argument | Type | Range | Default | Note |
---|---|---|---|---|
horizontalLength | num | 0..1000 | 10 | In % of pie radius |
extensionLength | num | 0..1000 | 0 | Not implemented |
vAlignment | int | 1..3 | center | |
stroke | num[] | 0..1000 | 1 | Dimension:[pt] |
color | rgba | 0..255 | gray | |
colorVariant | int | -1..128 | solid |
Examples
PieChartAuxLines(10;;bottom)
PieChartAuxLines(;;bottom;;black)
Description
The PieChartAuxLines() function can be used to better position the outside labels.
| PIE_CHART_AUX_LINES_01 |
1 | OpenDrawing(200;200) |
2 | |
3 | ChartData(4 13 9 18 11 8) |
4 | |
5 | PieChartAuxLines() /* After PieChart() */ |
6 | /* Set up styles. */ |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | BorderStyle(all;;2;white) |
14 | ShadowStyle(all;2 2 3) |
15 | |
16 |
The length of the auxiliary lines can be controlled by the argument horizontalLength. It is to be entered in percent of the segment length. The argument extensionLength is currently not used and is ignored. By using the argument vAlignment, the position of the auxiliary line can be defined relative to the label. When vAlignment = bottom, the auxiliary line is positioned below the label, when vAlignment = top above the label, when vAlignment = center in the center (default). The stroke and color can be varied by using the arguments stroke, color and colorVariant.
| PIE_CHART_AUX_LINES_02 |
1 | OpenDrawing(200;200) |
2 | |
3 | ChartData(18 12 12 12 9 8 2) |
4 | |
5 | PieChartAuxLines(10;;bottom;0.25;gray) /* After PieChart() */ |
6 | /* Set up styles. */ |
7 | |
8 | BorderStyle(all;;1.5;white) |
9 | LabelTexts(;"|||f1|%") |
10 | |
11 |
| PIE_CHART_AUX_LINES_03 |
1 | OpenDrawing(240;240) |
2 | |
3 | ChartData(94 65 23 10 5) |
4 | |
5 | 6; /* Pie depth. */ |
6 | 60) /* Inner radius. */ |
7 | PieChartAuxLines(10;;bottom;0.25;gray) /* After PieChart() */ |
8 | /* Set up styles. */ |
9 | FillColorScheme(blue) |
10 | BorderStyle(all;;0.0;white) |
11 | ShadowStyle(all;2 2 3;lightGray) |
12 | LabelTexts(;"|u| (|f1|%)") |
13 | |
14 |
| PIE_CHART_AUX_LINES_04 |
1 | OpenDrawing(230;230) |
2 | |
3 | ChartData(100 91 15.2 90 53.2 89.97) |
4 | |
5 | PieChartAuxLines(10;;center;0.25;#555) /* After PieChart() */ |
6 | /* Set up styles. */ |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | ShadowStyle(all;2 2 3) |
16 | LabelTexts(;"|f1|\n(|f1|%)") |
17 | LabelStyle(;Verdana;9;plain;black;center) |
18 | LabelBackground(1;#fafbfe;;1;#fafbfe;;2 2 3) |
19 | |
20 |
The formatted output of the absolute and/or relative values is explained in detail together with examples in Numbers.