You can add a pie chart with a call to this template. This template uses the Vega version 2 JSON specification. An older template {{Pie chart}} is based on CSS rendering. The template GraphChart allows adding of map, line, bar and area charts, as well as stacked line, stacked bar and stacked area charts, but no pie charts. The template GraphChart also uses Vega version 2 and uses Module:Graph with Scribunto/Lua programming. This Template:Graph:PieChart doesn't use Lua.
Example usage:
{{Graph:PieChart|legend=Fruits|radius=125|values= [
{"x": "Peaches","y": 100},
{"x": "Plums","y": 32},
{"x": "Blueberries","y": 80},
{"x": "Strawberries","y": 46},
{"x": "Bananas","y": 41}
]
}}
![]() | Graphs are unavailable due to technical issues. There is more info on Phabricator and on MediaWiki.org. |
TemplateData for Graph:PieChart
This template adds a pie chart to the page using Graph extension
Parameter | Description | Type | Status | |
---|---|---|---|---|
Radius | radius | Specify the radius of the pie in number of pixels
| Number | suggested |
Legend Title | legend | The title that will appear above the legend, or '-' to hide it
| String | suggested |
Inner Radius | innerradius | To create a doughnut chart specify an inner radius
| Number | optional |
Values | values data | Specify the label value pairs
| Unknown | required |
The colors of the slices | rangeliteral colors | The colors of the slices, specified as Vega defined rangeliteral. This can also be a list like [ "red", "green" ]
| String | optional |
You can add a pie chart with a call to this template. This template uses the Vega version 2 JSON specification. An older template {{Pie chart}} is based on CSS rendering. The template GraphChart allows adding of map, line, bar and area charts, as well as stacked line, stacked bar and stacked area charts, but no pie charts. The template GraphChart also uses Vega version 2 and uses Module:Graph with Scribunto/Lua programming. This Template:Graph:PieChart doesn't use Lua.
Example usage:
{{Graph:PieChart|legend=Fruits|radius=125|values= [
{"x": "Peaches","y": 100},
{"x": "Plums","y": 32},
{"x": "Blueberries","y": 80},
{"x": "Strawberries","y": 46},
{"x": "Bananas","y": 41}
]
}}
![]() | Graphs are unavailable due to technical issues. There is more info on Phabricator and on MediaWiki.org. |
TemplateData for Graph:PieChart
This template adds a pie chart to the page using Graph extension
Parameter | Description | Type | Status | |
---|---|---|---|---|
Radius | radius | Specify the radius of the pie in number of pixels
| Number | suggested |
Legend Title | legend | The title that will appear above the legend, or '-' to hide it
| String | suggested |
Inner Radius | innerradius | To create a doughnut chart specify an inner radius
| Number | optional |
Values | values data | Specify the label value pairs
| Unknown | required |
The colors of the slices | rangeliteral colors | The colors of the slices, specified as Vega defined rangeliteral. This can also be a list like [ "red", "green" ]
| String | optional |