Usage

The following code will produce the pie chart with values: 4, 2, 1, 2, 3:

{{Pie chart
|value1=4
|value2=2
|value3=1
|value4=2
|value5=3
}}

This pie chart has an error, or your browser doesn't support pie charts.


Up to 20 data values can be used.

The following code will produce the pie chart with values: 5, 3, 2, 4, 2 in shades of blue:

{{Pie chart
|value1=5
|value2=3
|value3=2
|value4=4
|value5=2
|color1=#44CCFF
|color2=#33AAFF
|color3=#2288FF
|color4=#1166FF
|color5=#0044FF
}}

This pie chart has an error, or your browser doesn't support pie charts.


Browser support

The pie chart template is currently supported in Chrome 72 and later, Edge 79 and later, Firefox 83 and later, Safari 12.1 and later, and Opera 60 and later. Internet Explorer is not supported.

If you try to use pie charts on unsupported browsers, you get an error showing that you are using an unsupported browser.

No description.

Template parameters

ParameterDescriptionTypeStatus
Sizesize

Size of pie chart

Default
150px
Example
200px
Stringoptional
Border widthborder-width

Width of border in pie chart

Default
1px
Example
2px
Stringoptional
Border styleborder-style

Style of border in pie chart

Default
solid
Example
dashed
Stringoptional
Border colorborder-color

Color of border in pie chart

Default
black
Example
red
Stringoptional
Marginmargin

Margin around pie chart

Default
0
Example
2px 4px
Stringoptional
Other stylesstyle

Other styles to pie chart

Example
display: inline block;
Stringoptional
1st data valuevalue1 1

Value of 1st data

Default
0
Example
10
Numberrequired
2nd data valuevalue2 2

Value of 2nd data

Default
0
Example
10
Numbersuggested
3rd data valuevalue3 3

Value of 3rd data

Default
0
Example
10
Numbersuggested
4th data valuevalue4 4

Value of 4th data

Default
0
Example
10
Numbersuggested
5th data valuevalue5 5

Value of 5th data

Default
0
Example
10
Numbersuggested
6th data valuevalue6 6

Value of 6th data

Default
0
Example
10
Numberoptional
7th data valuevalue7 7

Value of 7th data

Default
0
Example
10
Numberoptional
8th data valuevalue8 8

Value of 8th data

Default
0
Example
10
Numberoptional
9th data valuevalue9 9

Value of 9th data

Default
0
Example
10
Numberoptional
10th data valuevalue10 10

Value of 10th data

Default
0
Example
10
Numberoptional
11th data valuevalue11 11

Value of 11th data

Default
0
Example
10
Numberoptional
12th data valuevalue12 12

Value of 12th data

Default
0
Example
10
Numberoptional
13th data valuevalue13 13

Value of 13th data

Default
0
Example
10
Numberoptional
14th data valuevalue14 14

Value of 14th data

Default
0
Example
10
Numberoptional
15th data valuevalue15 15

Value of 15th data

Default
0
Example
10
Numberoptional
16th data valuevalue16 16

Value of 16th data

Default
0
Example
10
Numberoptional
17th data valuevalue17 17

Value of 17th data

Default
0
Example
10
Numberoptional
18th data valuevalue18 18

Value of 18th data

Default
0
Example
10
Numberoptional
19th data valuevalue19 19

Value of 19th data

Default
0
Example
10
Numberoptional
20th data valuevalue20 20

Value of 20th data

Default
0
Example
10
Numberoptional
1st data colorcolor1

Color of 1st data

Default
#9999FF
Example
red
Stringoptional
2nd data colorcolor2

Color of 2nd data

Default
#993366
Example
red
Stringoptional
3rd data colorcolor3

Color of 3rd data

Default
#FFFFCC
Example
red
Stringoptional
4th data colorcolor4

Color of 4th data

Default
#CCFFFF
Example
red
Stringoptional
5th data colorcolor5

Color of 5th data

Default
#660066
Example
red
Stringoptional
6th data colorcolor6

Color of 6th data

Default
#FF8080
Example
red
Stringoptional
7th data colorcolor7

Color of 7th data

Default
#0066CC
Example
red
Stringoptional
8th data colorcolor8

Color of 8th data

Default
#CCCCFF
Example
red
Stringoptional
9th data colorcolor9

Color of 9th data

Default
#000080
Example
red
Stringoptional
10th data colorcolor10

Color of 10th data

Default
#FF00FF
Example
red
Stringoptional
11th data colorcolor11

Color of 11th data

Default
#FFFF00
Example
red
Stringoptional
12th data colorcolor12

Color of 12th data

Default
#00FFFF
Example
red
Stringoptional
13th data colorcolor13

Color of 13th data

Default
#800080
Example
red
Stringoptional
14th data colorcolor14

Color of 14th data

Default
#800000
Example
red
Stringoptional
15th data colorcolor15

Color of 15th data

Default
#008080
Example
red
Stringoptional
16th data colorcolor16

Color of 16th data

Default
#0000FF
Example
red
Stringoptional
17th data colorcolor17

Color of 17th data

Default
#00CCFF
Example
red
Stringoptional
18th data colorcolor18

Color of 18th data

Default
#CCFFFF
Example
red
Stringoptional
19th data colorcolor19

Color of 19th data

Default
#CCFFCC
Example
red
Stringoptional
20th data colorcolor20

Color of 20th data

Default
#FFFF99
Example
red
Stringoptional