Template:Pie chart with legend: Difference between revisions
Fix |
m 1 revision imported |
(No difference)
|
Latest revision as of 17:49, 1 March 2025
Page Template:Pie chart with legend/styles.css must have content model "Sanitized CSS" for TemplateStyles (current model is "plain text").
![]() | This template uses TemplateStyles: Template:Pie chart with legend/styles.css |
Usage
The following code will produce the pie chart of phone sales in millions Page Template:Pie chart with legend/styles.css must have content model "Sanitized CSS" for TemplateStyles (current model is "plain text").
|
|
Apple |
167 |
|
28 |
Samsung |
234 |
Xiaomi |
96 |
Oppo |
54 |
{{Pie chart with legend |value1=167 |value2=28 |value3=234 |value4=96 |value5=54 |name1=Apple |name2=Google |name3=Samsung |name4=Xiaomi |name5=Oppo }}
The following code will produce the pie chart of desktop OS market share as of April 2024.[1] Page Template:Pie chart with legend/styles.css must have content model "Sanitized CSS" for TemplateStyles (current model is "plain text").
|
|
Windows |
72.22% |
macOS |
14.73% |
Linux |
3.88% |
Chrome OS |
2.45% |
FreeBSD |
0.01% |
Others |
6.7% |
{{Pie chart with legend |Windows |72.22 |macOS |14.73 |Linux |3.88 |Chrome OS |2.45 |FreeBSD |0.01 |Others |6.7 |suffix=%}}
Up to 20 data values can be used.
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.