Jump to content

Template:Piechart

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Nux (talk | contribs) at 16:27, 6 January 2024. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Page Template:Piechart/style.css has no content.

See: 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}
}}

Page Template:Piechart/style.css has no content.

  1. sweets: 5 (45.5%)
  2. sandwiches: 3 (27.3%)
  3. cookies: 2 (18.2%)
  4. drinks: 1 (9.1%)

See also