Template:Piechart
From The Right Wiki
Jump to navigationJump to search
File:Test Template Info-Icon - Version (2).svg Template documentation[view] [edit] [history] [purge]
File:Lua-Logo.svg | This template uses Lua: |
CSS | This template uses TemplateStyles: |
See more examples here: Module:Piechart Quick example with custom colors and a legend:
{{Piechart| [
{"label": "sweets: $v", "value": 5, "color":"darkred"},
{"label": "sandwiches: $v", "value": 3, "color":"wheat"},
{"label": "cookies: $v", "value": 2, "color":"goldenrod"},
{"label": "drinks: $v", "value": 1, "color":"#ccf"}
]
|meta={"autoscale":true, "legend":true}
}}
- sweets: 5 (45.5%)
- sandwiches: 3 (27.3%)
- cookies: 2 (18.2%)
- drinks: 1 (9.1%)