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

PieChart(shadow+label;​;​65)

4

PieChartCenterLabelText("CHART\nA-1")

5

PieChartCenterLabelStyle(Arial;​12;​bold;​#555;​;​;​;​;​;​2 2 3)

6

/* Set up styles. */

7

FillStyle(1;​#ffb400;​shaded)

8

FillStyle(2;​#f81a53;​shaded)

9

FillStyle(3;​#0073dd;​shaded)

10

FillStyle(4;​#00a79d;​shaded)

11

BorderStyle(all;​none)

12

ShadowStyle(all;​2 2 3)

13

CloseDrawing()

PIE_CHART_CENTER_LABEL_TEXT_01

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

OpenChart(50;​50;​120;​120;​on)

3

ChartData(45 135 90 90)

4

PieChart(label)

5

PieChartCenterLabelText("Total:\n|u|")

6

PieChartCenterLabelStyle(Arial;​11;​bold;​#555)

7

PieChartCenterLabelBackground(#fff;​;​3;​#fff;​;​2 2 3)

8

/* Set up styles. */

9

FillStyle(1;​#ffb400;​shaded)

10

FillStyle(2;​#f81a53;​shaded)

11

FillStyle(3;​#0073dd;​shaded)

12

FillStyle(4;​#00a79d;​shaded)

13

BorderStyle(all;​;​1.5;​white)

14

LabelTexts(1;​"|u|\n(|f1|%)")

15

LabelStyle(;​Arial;​10;​plain;​black;​center)

16

CloseChart()

17

CloseDrawing()

PIE_CHART_CENTER_LABEL_TEXT_02

For further information, e.g. styled texts, hyphenation, please refer to Texts.

Scroll to Top