Template:Pie chart/testcases
Jump to navigation
Jump to search
| This is the template test cases page for the sandbox of Template:Pie chart. to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki; see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins and parsers with these links: |
Special cases
[edit source]| {{Pie chart}} | {{Pie chart/sandbox}} |
|---|---|
|
|
| {{Pie chart}} | {{Pie chart/sandbox}} |
|---|---|
|
|
| {{Pie chart}} | {{Pie chart/sandbox}} |
|---|---|
|
|
Default colors
[edit source]| {{Pie chart}} | {{Pie chart/sandbox}} |
|---|---|
|
EU funding programmes 2014-2020 (€1,087 billion)
|
EU funding programmes 2014-2020 (€1,087 billion)
|
| {{Pie chart}} | {{Pie chart/sandbox}} |
|---|---|
|
EU funding programmes 2014-2020 (€1,087 billion)
|
EU funding programmes 2014-2020 (€1,087 billion)
|
| {{Pie chart}} | {{Pie chart/sandbox}} |
|---|---|
|
EU funding programmes 2014-2020 (€1,087 billion)
|
EU funding programmes 2014-2020 (€1,087 billion)
|
| {{Pie chart}} | {{Pie chart/sandbox}} |
|---|---|
|
EU funding programmes 2014-2020 (€1,087 billion)
|
EU funding programmes 2014-2020 (€1,087 billion)
|
Define colors
[edit source]| {{Pie chart}} | {{Pie chart/sandbox}} |
|---|---|
|
EU funding programmes 2014-2020 (€1,087 billion)
|
EU funding programmes 2014-2020 (€1,087 billion)
|
Over under 100
[edit source]Not 100 total percent without other
[edit source]| {{Pie chart}} | {{Pie chart/sandbox}} |
|---|---|
|
EU funding programmes 2014-2020 (€1,087 billion)
|
EU funding programmes 2014-2020 (€1,087 billion)
|
Autoscale values over 100
[edit source]{{Pie chart|caption=EU funding programmes 2014-2020[1] |color1=darkgreen |color2=lightgreen |color3=darkblue |color4=lightbrown |color5=darkgrey |label1=Sustainable Growth/Natural Resources |label2=Economic, Territorial and Social Cohesion |label3=Competitiveness for Growth and Jobs |label4=Global Europe |label5=Administration |other=1 |thumb=left |value1=420 |value2=371 |value3=142 |value4=66 |value5=70}}
| {{Pie chart}} | {{Pie chart/sandbox}} |
|---|---|
|
EU funding programmes 2014-2020[1]
|
EU funding programmes 2014-2020[1]
|
With other
[edit source]With other as 1
[edit source]| {{Pie chart}} | {{Pie chart/sandbox}} |
|---|---|
|
|
With other as yes
[edit source]| {{Pie chart}} | {{Pie chart/sandbox}} |
|---|---|
|
|
With other color
[edit source]{{Pie chart|label1=One |label2=Two |label3=Three |other=yes |other-color=lightpink |other-label=Pinky other |value1=42 |value2=32 |value3=12}}
| {{Pie chart}} | {{Pie chart/sandbox}} |
|---|---|
|
|
Links
[edit source]Links in labels and caption, with other, with custom colors.
| {{Pie chart}} | {{Pie chart/sandbox}} |
|---|---|
|
Religion in the Czech Republic in 2001.
|
Religion in the Czech Republic in 2001.
|
With radius
[edit source]Small radius
[edit source]| {{Pie chart}} | {{Pie chart/sandbox}} |
|---|---|
Big radius
[edit source]| {{Pie chart}} | {{Pie chart/sandbox}} |
|---|---|
|
|
Many values
[edit source]Many with custom colors
[edit source]Many with other
[edit source]Many with default colors
[edit source]Footer
[edit source]| {{Pie chart}} | {{Pie chart/sandbox}} |
|---|---|
|
EU funding programmes 2014-2020
|
EU funding programmes 2014-2020
|
Thumb
[edit source]Thumb left
[edit source]{{Pie chart}}
EU funding programmes 2014-2020
- Sustainable Growth (38.0%)
- Competitiveness (24.0%)
- Global Europe (20.0%)
- Savings (18.0%)
EU funding programmes 2014-2020
- Sustainable Growth (38.0%)
- Competitiveness (24.0%)
- Global Europe (20.0%)
- Savings (18.0%)
Thumb right
[edit source]{{Pie chart}}
EU funding programmes 2014-2020
- Sustainable Growth (38.0%)
- Competitiveness (24.0%)
- Global Europe (20.0%)
- Savings (18.0%)
EU funding programmes 2014-2020
- Sustainable Growth (38.0%)
- Competitiveness (24.0%)
- Global Europe (20.0%)
- Savings (18.0%)
Minimal
[edit source]Minimal (sandbox)
[edit source]Minimal in table
[edit source]| Region | Latin
America |
Europe | Oceania | North
America |
Africa | Asia | World |
|---|---|---|---|---|---|---|---|
| Percent catholic | 83.3%
|
36.4%
|
26.8%
|
25.1%
|
17.9%
|
4.3%
|
21.6%
|
| Percent of worldwide
Catholic population |
42%
|
25%
|
1%
|
8%
|
13%
|
12%
|
All |
Minimal in table (sandbox)
[edit source]| Region | Latin
America |
Europe | Oceania | North
America |
Africa | Asia | World |
|---|---|---|---|---|---|---|---|
| Percent catholic | 83.3%
|
36.4%
|
26.8%
|
25.1%
|
17.9%
|
4.3%
|
21.6%
|
| Percent of worldwide
Catholic population |
42%
|
25%
|
1%
|
8%
|
13%
|
12%
|
All |
JSON
[edit source]Long labels with $auto
[edit source]{{Pie chart|[
{"label": "Sustainable Growth/Natural Resources: $auto", "value": 38.6, "color":"darkred"},
{"label": "Competitiveness for Growth and Jobs: $auto", "value": 13.1, "color":"wheat"},
{"label": "Global Europe: $auto", "value": 6.1, "color":"goldenrod"},
{"label": "Economic, Territorial and Social Cohesion: $auto", "value": 1.7, "color":"#ccf"}
]|meta={"autoscale":true, "legend":true} |thumb=none}}
{{Pie chart}}
- Sustainable Growth/Natural Resources: 38.6 (64.9%)
- Competitiveness for Growth and Jobs: 13.1 (22.0%)
- Global Europe: 6.1 (10.3%)
- Economic, Territorial and Social Cohesion: 1.7 (2.86%)
- Sustainable Growth/Natural Resources: 38.6 (64.9%)
- Competitiveness for Growth and Jobs: 13.1 (22.0%)
- Global Europe: 6.1 (10.3%)
- Economic, Territorial and Social Cohesion: 1.7 (2.86%)
Long labels with custom labelformat
[edit source]{{Pie chart|[
{"label": "Sustainable Growth/Natural Resources", "value": 38.6, "color":"darkred"},
{"label": "Competitiveness for Growth and Jobs", "value": 13.1, "color":"wheat"},
{"label": "Global Europe", "value": 6.1, "color":"goldenrod"},
{"label": "Economic, Territorial and Social Cohesion", "value": 1.7, "color":"#ccf"}
]|meta={"autoscale":true, "legend":true, "labelformat":"$percent (raw: $value) ▶ $label"} |thumb=none}}
{{Pie chart}}
- 64.9% (raw: 38.6) ▶ Sustainable Growth/Natural Resources
- 22.0% (raw: 13.1) ▶ Competitiveness for Growth and Jobs
- 10.3% (raw: 6.1) ▶ Global Europe
- 2.86% (raw: 1.7) ▶ Economic, Territorial and Social Cohesion
- 64.9% (raw: 38.6) ▶ Sustainable Growth/Natural Resources
- 22.0% (raw: 13.1) ▶ Competitiveness for Growth and Jobs
- 10.3% (raw: 6.1) ▶ Global Europe
- 2.86% (raw: 1.7) ▶ Economic, Territorial and Social Cohesion
Long labels with custom labelformat non-JSON meta
[edit source]{{Pie chart|[
{"label": "Sustainable Growth/Natural Resources", "value": 38.6, "color":"darkred"},
{"label": "Competitiveness for Growth and Jobs", "value": 13.1, "color":"wheat"},
{"label": "Global Europe", "value": 6.1, "color":"goldenrod"},
{"label": "Economic, Territorial and Social Cohesion", "value": 1.7, "color":"#ccf"}
]|autoscale=true |labelformat=$percent (raw: $value) ▶ $label |legend=true |thumb=none}}
{{Pie chart}}
- 64.9% (raw: 38.6) ▶ Sustainable Growth/Natural Resources
- 22.0% (raw: 13.1) ▶ Competitiveness for Growth and Jobs
- 10.3% (raw: 6.1) ▶ Global Europe
- 2.86% (raw: 1.7) ▶ Economic, Territorial and Social Cohesion
- 64.9% (raw: 38.6) ▶ Sustainable Growth/Natural Resources
- 22.0% (raw: 13.1) ▶ Competitiveness for Growth and Jobs
- 10.3% (raw: 6.1) ▶ Global Europe
- 2.86% (raw: 1.7) ▶ Economic, Territorial and Social Cohesion
Long labels with $percent and emoji-icons
[edit source]{{Pie chart|[
{"label": "Sustainable Growth/Natural Resources $percent 🌳", "value": 38.6, "color":"darkred"},
{"label": "Competitiveness for Growth and Jobs: $percent 📈", "value": 13.1, "color":"wheat"},
{"label": "Global Europe: $percent 🇪🇺", "value": 6.1, "color":"goldenrod"},
{"label": "Economic, Territorial and Social Cohesion: $percent 🚀", "value": 1.7, "color":"#ccf"}
]|meta={"autoscale":true, "legend":true} |thumb=none}}
{{Pie chart}}
- Sustainable Growth/Natural Resources 64.9% 🌳
- Competitiveness for Growth and Jobs: 22.0% 📈
- Global Europe: 10.3% 🇪🇺
- Economic, Territorial and Social Cohesion: 2.86% 🚀
- Sustainable Growth/Natural Resources 64.9% 🌳
- Competitiveness for Growth and Jobs: 22.0% 📈
- Global Europe: 10.3% 🇪🇺
- Economic, Territorial and Social Cohesion: 2.86% 🚀
Big raw numbers
[edit source]| {{Pie chart}} | {{Pie chart/sandbox}} |
|---|---|
|
|
Values in mln
[edit source]| {{Pie chart}} | {{Pie chart/sandbox}} |
|---|---|
|
|
Complicated decimal numbers
[edit source]| {{Pie chart}} | {{Pie chart/sandbox}} |
|---|---|
Colors rendering
[edit source]Custom colors
Default colors
Default labels
Full color palette
Custom colors legend
- pie: 40.0%
- cheese pizza: 20.0%
- mixed pizza: 20.0%
- raw pizza: 20.0%
Colors rendering (sandbox)
[edit source]Custom colors
Default colors
Default labels
Full color palette
Custom colors legend
- pie: 40.0%
- cheese pizza: 20.0%
- mixed pizza: 20.0%
- raw pizza: 20.0%
Legend position
[edit source]{{Pie chart| thumb=none| [
{"label": "ciastka", "value": 2, "color":"goldenrod"},
{"label": "napoje", "value": 1, "color":"#ccf"},
{"label": "słodycze", "value": 5, "color":"darkred"},
{"label": "kanapki", "value": 3, "color":"wheat"}
]
|meta={"autoscale":true, "legend":true, "direction":"row|row-reverse|column|column-reverse"}
}}
(border for clarity)
Default
- ciastka: 2 (18.2%)
- napoje: 1 (9.09%)
- słodycze: 5 (45.5%)
- kanapki: 3 (27.3%)
row
- ciastka: 2 (18.2%)
- napoje: 1 (9.09%)
- słodycze: 5 (45.5%)
- kanapki: 3 (27.3%)
row-reverse
- ciastka: 2 (18.2%)
- napoje: 1 (9.09%)
- słodycze: 5 (45.5%)
- kanapki: 3 (27.3%)
column
- ciastka: 2 (18.2%)
- napoje: 1 (9.09%)
- słodycze: 5 (45.5%)
- kanapki: 3 (27.3%)
column-reverse
- ciastka: 2 (18.2%)
- napoje: 1 (9.09%)
- słodycze: 5 (45.5%)
- kanapki: 3 (27.3%)
Legend position (sandbox)
[edit source]{{Pie chart/sandbox| thumb=none| [
{"label": "ciastka", "value": 2, "color":"goldenrod"},
{"label": "napoje", "value": 1, "color":"#ccf"},
{"label": "słodycze", "value": 5, "color":"darkred"},
{"label": "kanapki", "value": 3, "color":"wheat"}
]
|meta={"autoscale":true, "legend":true, "direction":"row|row-reverse|column|column-reverse"}
}}
(border for clarity)
Default
- ciastka: 2 (18.2%)
- napoje: 1 (9.09%)
- słodycze: 5 (45.5%)
- kanapki: 3 (27.3%)
row
- ciastka: 2 (18.2%)
- napoje: 1 (9.09%)
- słodycze: 5 (45.5%)
- kanapki: 3 (27.3%)
row-reverse
- ciastka: 2 (18.2%)
- napoje: 1 (9.09%)
- słodycze: 5 (45.5%)
- kanapki: 3 (27.3%)
column
- ciastka: 2 (18.2%)
- napoje: 1 (9.09%)
- słodycze: 5 (45.5%)
- kanapki: 3 (27.3%)
column-reverse
- ciastka: 2 (18.2%)
- napoje: 1 (9.09%)
- słodycze: 5 (45.5%)
- kanapki: 3 (27.3%)
References
[edit source]- ^ https://commission.europa.eu/strategy-and-policy/eu-budget/long-term-eu-budget/2014-2020/eu-funding-programmes_en
- ^ A list-defined reference.
- ^ And then he said yadda, yadda, yadda... And we knew how things were.