pieChart

Print a pie or donut chart graphic.

1
{{$pieChart data="1,2,3,5"}}
Example
format JSON XML
Data JSON
1
2
3
4
5
{
"Product": {
"sales": "1,2,3,5"
}
}
HTML
1
2
3
4
5
6
7
8
9
10
11
{{$pieChart data=Product.sales
mainText=""
width=140
height=140
}}
{{$pieChart data=Product.sales
thickness=6
labelColorStyle="solid"
width=140
height=140
}}
Result
Data XML
1
2
<Product sales="1,2,3,5">
</Product>
HTML
1
2
3
4
5
6
7
8
9
10
11
{{$pieChart data=Product._sales
mainText=""
width=140
height=140
}}
{{$pieChart data=Product._sales
thickness=6
labelColorStyle="solid"
width=140
height=140
}}
Result

Params

Custom pie example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{{$pieChart
data="1,2,3,5"
width=140
height=140
thickness=0
mainText=""
mainFontSize=16
mainFontColor="#2583de"
mainFontFamily="arial, helvetica, sans"
labelTexts="pp%"
labelTextsRepeat=true
labelTextsDecimals=0
labelFontColors="white"
labelFontSize=10
labelColorStyle="solid"
labelFontFamily="arial, helvetica, sans"
labelsPosition=0.7
shapeColors="#2583de,#c225de"
shapeColorStyle="scale"
margin=0
borderWidth=1
borderColor="white"
order="none"
fit=false
}}

Custom donut example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{{$pieChart
data="1,2,3,5,8"
width=140
height=140
thickness=6
mainText="tt"
mainFontSize=16
mainFontColor="#2583de"
mainFontFamily="arial, helvetica, sans"
labelTexts="pp%"
labelTextsRepeat=true
labelTextsDecimals=0
labelFontColors="grey"
labelFontSize=10
labelColorStyle="solid"
labelFontFamily="arial, helvetica, sans"
labelsPosition=0.7
shapeColors="#2583de,#c225de"
shapeColorStyle="scale"
margin=0
borderWidth=1
borderColor="white"
order="none"
fit=false
}}

Result