CircularBarChart

New in version 5.0

CircularBarChart ( appearanceConst ;​ startAngle ;​ arcAngle ;​ innerRadiusMin ;​ barWidth ;​ barGap ;​ barBackgroundWidth ;​ barBackgroundOffset ;​ barBackgroundShading ;​ barBackgroundColor1 ;​ barBackgroundColor2 ;​ . . . ;​ barBackgroundColor100 )

Argument Type Range Default Note
appearanceConst int 0..127 default
startAngle num -360..+360 0
arcAngle num -360..+360 360 If negative, go counter-clockwise.
innerRadiusMin num 0..1 0.25 Relative to outer radius.
barWidth num 0..1 0.15 Relative to outer radius.
barGap num 0..1 0 Relative to outer radius.
barBackgroundWidth num 0..10 1 Relative to bar width.
barBackgroundOffset num -1..1 0 Relative to bar width.
barBackgroundShading int -1..128 0
barBackgroundColor1 rgba 0..255 #e6e6e6
barBackgroundColor2 rgba 0..255 #e6e6e6
... rgba 0..255 #e6e6e6
barBackgroundColor100 rgba 0..255 #e6e6e6
Description

The CircularBarChart() function makes it possible to draw bars arranged in concentric circles. The appearance of the bars can be controlled by the FillStyle() , BorderStyle() and SymbolStyle() functions; the scale by using the Scaling() function.


Location of the labels on circular bar charts:
Constant Value Positioning
smartBegin 1 Beginning of bar if enough space is available
smartCenter 2 Middle of bar if enough space is available
smartEnd 3 End of bar if enough space is available
begin 4 Beginning of bar (forced)
center 5 Middle of bar (forced)
end 6 End of bar (forced)
edge 7 Edge on end of bar (forced)
smartOut 8 Outside if enough space is available (default)
out 9 Outside end of bar (forced)
(no constant) 10 Outside beginning of bar (tangential)
(no constant) 11 Outside beginning of bar (circular)

Please note, legend, title and label backgrounds are ignored in combination with circular bar charts.

CIRCULAR_BAR_CHART_01
1

OpenDrawing(100;​100)

2

ChartData(83.2)

3

CircularBarChart(default;​

4

0;​ /* Start angle in [deg].  */

5

360;​ /* Arc angle in [deg]. If negative, go counter-clockwise. */

6

0.25;​ /* Inner radius minimum. Relative to outer radius.  */

7

0.15;​ /* Bar width. Relative to outer radius.  */

8

0;​ /* Bar gap. Relative to outer radius.  */

9

1;​ /* Bar background width. Relative to bar width.  */

10

0;​ /* Bar background offset. Relative to bar width.  */

11

0;​ /* Bar background shading: 0...solid, -1...shaded.  */

12

lightGray) /* Bar background color.  */

13

/* Use style functions to control the appearance of bar(s). */

14

FillStyle(1;​79 139 223)

15

BorderStyle(1;​none)

16

/* Use the Scaling() function to control the value range. */

17

Scaling(all;​linear;​0;​100)

18

AddText(50;​50;​"83.2%";​Arial;​14;​plain;​#666;​center;​center)

19

Background( #f3f6f2;​0;​0;​;​;​2 2 2;​lightGray)

20

BackgroundOptions(8)

21

CloseDrawing()

CIRCULAR_BAR_CHART_01
CIRCULAR_BAR_CHART_02
1

OpenDrawing(200;​100)

2

3

/* Left Graph. */

4

OpenChart(0;​0;​100;​100)

5

ChartData(83.2)

6

CircularBarChart(shadow;​

7

0;​ /* Start angle in [deg].  */

8

360;​ /* Arc angle in [deg]. If negative, go counter-clockwise. */

9

0.25;​ /* Inner radius minimum. Relative to outer radius.  */

10

0.15;​ /* Bar width. Relative to outer radius.  */

11

0;​ /* Bar gap. Relative to outer radius.  */

12

1;​ /* Bar background width. Relative to bar width.  */

13

0;​ /* Bar background offset. Relative to bar width.  */

14

0;​ /* Bar background shading: 0...solid, -1...shaded.  */

15

#ffe0e0) /* Bar background color.  */

16

/* Use style functions to control the appearance of bar(s). */

17

FillStyle(1;​#D72729)

18

BorderStyle(all;​none)

19

ShadowStyle(all;​1 1 3;​lightGray)

20

/* Use the Scaling() function to control the value range. */

21

Scaling(all;​linear;​0;​100)

22

AddText(50;​50;​"<span size=14>83.2</span>%\nDevice A";​Arial;​9;​plain;​#666;​center;​center)

23

CloseChart()

24

25

/* Right Graph. */

26

OpenChart(100;​0;​100;​100)

27

ChartData(83.2)

28

CircularBarChart(shadow;​

29

0;​ /* Start angle in [deg].  */

30

360;​ /* Arc angle in [deg]. If negative, go counter-clockwise. */

31

0;​ /* Inner radius minimum. Relative to outer radius.  */

32

1;​ /* Bar width. Relative to outer radius.  */

33

0;​ /* Bar gap. Relative to outer radius.  */

34

1;​ /* Bar background width. Relative to bar width.  */

35

0;​ /* Bar background offset. Relative to bar width.  */

36

0;​ /* Bar background shading: 0...solid, -1...shaded.  */

37

#f0f3bd) /* Bar background color.  */

38

/* Use style functions to control the appearance of bar(s). */

39

FillStyle(1;​#cbdb29;​shaded)

40

BorderStyle(all;​none)

41

ShadowStyle(all;​1 1 3;​lightGray)

42

/* Use the Scaling() function to control the value range. */

43

Scaling(all;​linear;​0;​100)

44

AddText(153;​66;​"38.5<span size=10>%</span>";​Arial;​15;​plain;​#fff;​center;​center)

45

CloseChart()

46

CloseDrawing()

CIRCULAR_BAR_CHART_02
CIRCULAR_BAR_CHART_03
1

OpenDrawing(200;​200)

2

OpenChart(10;​10;​180;​180)

3

ChartData(83.2;​63.8;​47.5)

4

CircularBarChart(shadow+label;​

5

180;​ /* Start angle in [deg].  */

6

270;​ /* Arc angle in [deg]. If negative, go counter-clockwise. */

7

0.25;​ /* Inner radius minimum. Relative to outer radius.  */

8

0.15;​ /* Bar width. Relative to outer radius.  */

9

0.02;​ /* Bar gap. Relative to outer radius.  */

10

1;​ /* Bar background width. Relative to bar width.  */

11

0;​ /* Bar background offset. Relative to bar width.  */

12

0;​ /* Bar background shading: 0...solid, -1...shaded.  */

13

#f0f0f0 ) /* Bar background color.  */

14

/* Use style functions to control the appearance of bar(s). */

15

FillColorScheme(3)

16

BorderStyle(all;​none)

17

BarStyle(all;​0;​1) /* Bar caps at start and end of bar [0..7] */

18

ShadowStyle(all;​2 2 2;​lightGray)

19

LabelTexts(1;​"Group C: |f1|%")

20

LabelTexts(2;​"Group B: |f1|%")

21

LabelTexts(3;​"Group A: |f1|%")

22

LabelStyle(all;​Arial;​10;​bold;​#555)

23

LabelOptions(all;​ /* Bar number.  */

24

10;​ /* Label location [0..11]  */

25

/* 10...Labels at the begin of the bars - tangential. */

26

/* 11...Labels at the begin of the bars - circular.  */

27

3;​ /* Offset - circular.  */

28

0) /* Offset - radial.  */

29

/* Use the Scaling() function to control the value range. */

30

Scaling(all;​linear;​0;​100)

31

CloseChart()

32

CloseDrawing()

CIRCULAR_BAR_CHART_03
CIRCULAR_BAR_CHART_04
1

OpenDrawing(240;​240)

2

OpenChart(10;​10;​220;​220)

3

ChartData(0.932;​0.867;​0.691)

4

CircularBarChart(shadow+label;​

5

0;​ /* Start angle in [deg].  */

6

-270;​ /* Arc angle in [deg]. If negative, go counter-clockwise. */

7

0;​ /* Inner radius minimum. Relative to outer radius.  */

8

0.15;​ /* Bar width. Relative to outer radius.  */

9

0.05;​ /* Bar gap. Relative to outer radius.  */

10

1;​ /* Bar background width. Relative to bar width.  */

11

0;​ /* Bar background offset. Relative to bar width.  */

12

0;​ /* Bar background shading: 0...solid, -1...shaded.  */

13

#dae4f0;​#dff1fc;​#f0f3bd) /* Bar background colors.  */

14

/* Use style functions to control the appearance of bar(s). */

15

FillStyle(1;​#005ca9;​shaded)

16

FillStyle(2;​#00afef;​shaded)

17

FillStyle(3;​#cbdb29;​shaded)

18

BorderStyle(all;​none)

19

BarStyle(all;​0;​4) /* Bar caps at start and end of bar [0..7] */

20

ShadowStyle(all;​1 1 3;​lightGray)

21

LabelTexts(1;​"Company A: |2f1|%")

22

LabelTexts(2;​"Company B: |2f1|%")

23

LabelTexts(3;​"Company C: |2f1|%")

24

LabelStyle(all;​Verdana;​9;​bold;​#555)

25

LabelOptions(all;​ /* Bar number.  */

26

10;​ /* Label location [0..11]  */

27

/* 10...Labels at the begin of the bars - tangential. */

28

/* 11...Labels at the begin of the bars - circular.  */

29

3;​ /* Offset - circular.  */

30

0) /* Offset - radial.  */

31

/* Use the Scaling() function to control the value range. */

32

Scaling(all;​linear;​0;​1)

33

CloseChart()

34

CloseDrawing()

CIRCULAR_BAR_CHART_04
CIRCULAR_BAR_CHART_05
1

OpenDrawing(240;​240)

2

OpenChart(10;​10;​220;​220)

3

ChartData(83.2;​76.7;​69.8;​59.5)

4

CircularBarChart(shadow+label;​

5

-90;​ /* Start angle in [deg].  */

6

360;​ /* Arc angle in [deg]. If negative, go counter-clockwise. */

7

0.25;​ /* Inner radius minimum. Relative to outer radius.  */

8

0.15;​ /* Bar width. Relative to outer radius.  */

9

0.02;​ /* Bar gap. Relative to outer radius.  */

10

0.25;​ /* Bar background width. Relative to bar width.  */

11

0;​ /* Bar background offset. Relative to bar width.  */

12

0;​ /* Bar background shading: 0...solid, -1...shaded.  */

13

#eee) /* Bar background color.  */

14

/* Use style functions to control the appearance of bar(s). */

15

FillColorScheme(3)

16

BorderStyle(all;​none)

17

BarStyle(all;​7;​4) /* Bar caps at start and end of bar [0..7] */

18

ShadowStyle(all;​1 1 3;​lightGray)

19

LabelTexts(1;​"Test Company A: |f1|%")

20

LabelTexts(2;​"Test Company B: |f1|%")

21

LabelTexts(3;​"Test Company C: |f1|%")

22

LabelTexts(4;​"Test Company D: |f1|%")

23

LabelStyle(all;​Verdana;​9;​bold;​#555)

24

LabelStyle(1;​Verdana;​9;​bold;​white)

25

LabelStyle(3;​Verdana;​9;​bold;​white)

26

LabelOptions(all;​ /* Bar number.  */

27

begin;​ /* Label location [0..11] */

28

0;​ /* Offset - circular.  */

29

0) /* Offset - radial.  */

30

/* Use the Scaling() function to control the value range. */

31

Scaling(all;​linear;​0;​100)

32

CloseChart()

33

Background(#f3f6f2;​0;​0;​;​;​2 2 2;​lightGray)

34

BackgroundOptions(10)

35

CloseDrawing()

CIRCULAR_BAR_CHART_05
CIRCULAR_BAR_CHART_06
1

OpenDrawing(240;​240)

2

OpenChart(10;​10;​220;​220)

3

ChartData(0.832;​0.638;​0.475;​0.617;​0.757)

4

CircularBarChart(shadow+label;​

5

180;​ /* Start angle in [deg].  */

6

-270;​ /* Arc angle in [deg]. If negative, go counter-clockwise. */

7

0.5;​ /* Inner radius minimum. Relative to outer radius.  */

8

0.15;​ /* Bar width. Relative to outer radius.  */

9

0.05;​ /* Bar gap. Relative to outer radius.  */

10

1;​ /* Bar background width. Relative to bar width.  */

11

0;​ /* Bar background offset. Relative to bar width.  */

12

0;​ /* Bar background shading: 0...solid, -1...shaded.  */

13

#eee) /* Bar background color.  */

14

/* Use style functions to control the appearance of bar(s). */

15

FillColorScheme(19)

16

BorderStyle(all;​none)

17

BarStyle(all;​1;​1) /* Bar caps at start and end of bar [0..7] */

18

ShadowStyle(all;​1 1 3;​lightGray)

19

LabelTexts(5;​"Group A: |2f1|%")

20

LabelTexts(4;​"Group B: |2f1|%")

21

LabelTexts(3;​"Group C: |2f1|%")

22

LabelTexts(2;​"Group D: |2f1|%")

23

LabelTexts(1;​"Group E: |2f1|%")

24

LabelStyle(all;​Verdana;​9;​bold;​#555)

25

LabelOptions(all;​ /* Bar number.  */

26

10;​ /* Label location [0..11]  */

27

/* 10...Labels at the begin of the bars - tangential. */

28

/* 11...Labels at the begin of the bars - circular.  */

29

2;​ /* Offset - circular.  */

30

0) /* Offset - radial.  */

31

/* Use the Scaling() function to control the value range. */

32

Scaling(all;​linear;​0;​1)

33

CloseChart()

34

Background(#f3f6f2;​0;​0;​;​;​2 2 2;​lightGray)

35

BackgroundOptions(10)

36

CloseDrawing()

CIRCULAR_BAR_CHART_06
CIRCULAR_BAR_CHART_07
1

OpenDrawing(300;​300)

2

OpenChart(10;​10;​280;​280)

3

ChartData(832;​777;​667;​638;​603;​512;​475)

4

CircularBarChart(shadow+label;​

5

0;​ /* Start angle in [deg].  */

6

315;​ /* Arc angle in [deg]. If negative, go counter-clockwise. */

7

0.5;​ /* Inner radius minimum. Relative to outer radius.  */

8

0.15;​ /* Bar width. Relative to outer radius.  */

9

0.05;​ /* Bar gap. Relative to outer radius.  */

10

0.5;​ /* Bar background width. Relative to bar width.  */

11

0;​ /* Bar background offset. Relative to bar width.  */

12

0;​ /* Bar background shading: 0...solid, -1...shaded.  */

13

#eee) /* Bar background color.  */

14

/* Use style functions to control the appearance of bar(s). */

15

FillColorScheme(15)

16

BorderStyle(all;​none)

17

BarStyle(all;​0;​1) /* Bar caps at start and end of bar [0..7] */

18

ShadowStyle(all;​1 1 3;​lightGray)

19

LabelTexts(1;​"Los Angeles |u|")

20

LabelTexts(2;​"Montreal: |u|")

21

LabelTexts(3;​"Toronto: |u|")

22

LabelTexts(4;​"Chicago: |u|")

23

LabelTexts(5;​"Beijing: |u|")

24

LabelTexts(6;​"San Francisco: |u|")

25

LabelTexts(7;​"Vancouver: |u|")

26

LabelStyle(all;​Verdana;​9;​bold;​#555)

27

LabelOptions(all;​ /* Bar number.  */

28

10;​ /* Label location [0..11]  */

29

/* 10...Labels at the begin of the bars - tangential. */

30

/* 11...Labels at the begin of the bars - circular.  */

31

2;​ /* Offset - circular.  */

32

0) /* Offset - radial.  */

33

/* Use the Scaling() function to control the value range. */

34

Scaling(all;​linear;​0;​1000)

35

CloseChart()

36

CloseDrawing()

CIRCULAR_BAR_CHART_07
Scroll to Top
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×