PieChartCenterLabelText
PieChartCenterLabelText ( text )
Argument | Type | Range | Default | Note |
---|---|---|---|---|
text | styt | 0..1000 | "" | Max. 1000 chars. |
Examples
PieChartCenterLabelText("Distribution\nA")
PieChartCenterLabelText("|u|") /* Show total. */
Description
In addition, by using the PieChartCenterLabelText(), PieChartCenterLabelStyle() , PieChartCenterLabelBackground() and PieChartCenterLabelBackgroundOptions() functions, a text can be placed and drawn in the center of the chart. The four functions work the same way as the "standard" LabelTexts() , LabelStyle() , LabelBackground() and LabelBackgroundOptions() functions.
| PIE_CHART_CENTER_LABEL_TEXT_01 |
1 | OpenDrawing(200;200) |
2 | ChartData(100 75 50 25) |
3 | |
4 | PieChartCenterLabelText("CHART\nA-1") |
5 | PieChartCenterLabelStyle(Arial;12;bold;#555;;;;;;2 2 3) |
6 | /* Set up styles. */ |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | ShadowStyle(all;2 2 3) |
13 |
If the text in the PieChartCenterLabelText() function contains a format specifier, e.g. "|u|", the sum of all positive values is shown. A detailed explanation of all format specifiers, including numerous examples, can be found in Numbers.
| PIE_CHART_CENTER_LABEL_TEXT_02 |
1 | OpenDrawing(220;220) |
2 | |
3 | ChartData(45 135 90 90) |
4 | |
5 | PieChartCenterLabelText("Total:\n|u|") |
6 | PieChartCenterLabelStyle(Arial;11;bold;#555) |
7 | PieChartCenterLabelBackground(#fff;;3;#fff;;2 2 3) |
8 | /* Set up styles. */ |
9 | |
10 | |
11 | |
12 | |
13 | BorderStyle(all;;1.5;white) |
14 | LabelTexts(1;"|u|\n(|f1|%)") |
15 | LabelStyle(;Arial;10;plain;black;center) |
16 | |
17 |
For further information, e.g. styled texts, hyphenation, please refer to Texts.