Changes
no edit summary
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
== Pie chart ==
You can add a pie chart with a call to this template.
== Examples ==
'''Example usage''':
{| class="wikitable"
! style="text-align: left;" | <nowiki>{{</nowiki>{{BASEPAGENAME}}<br>
| table = Wikimedia/all sites by browser family and major percent.tab<br>
| field1 = browserFamily<br>
| field2 = browserMajorVer<br>
| value = percent<br>
| width = 300<br>
<nowiki>}}</nowiki>'''
|-
| {{{{BASEPAGENAME}}
| table = Wikimedia/all sites by browser family and major percent.tab
| field1 = browserFamily
| field2 = browserMajorVer
| value = percent
| width = 300
}}
|}
=== Template Data ===
<templatedata>
{
"params": {
"width": {
"description": "Specify the width of the pie in number of pixels",
"default": "300",
"type": "number",
"suggested": true
},
"table": {
"description": "Data page name on Commons, without the Data: prefix. The table should contain at least three columns - major group, minor group, and numeric value",
"required": true,
"example": "Wikimedia/all sites by browser family and major percent.tab"
},
"field1": {
"description": "Id of the column shown as the inner circle",
"required": true,
"example": "browserFamily"
},
"field2": {
"description": "Id of the column shown as the outer circle",
"required": true,
"example": "browserMajorVer"
},
"value": {
"description": "Id of the column with the numeric value",
"required": true,
"example": "percent"
},
"colors": {
"label": "The colors of the slices",
"description": "The colors of the slices, specified as Vega defined rangeliteral. This can also be a list like [ \"red\", \"green\" ]",
"example": "\"category10\"",
"type": "string",
"default": "\"category10\""
},
"innerportion": {
"description": "Portion of the radius shown for the inner circle. Must be between 0 and 0.5",
"example": "0.25",
"type": "number",
"default": "0.35"
},
"debug": {},
},
"description": "This template adds a pie chart to the page using Graph extension",
"format": "inline",
"paramOrder": [
"table",
"field1",
"field2",
"value",
"width",
"colors",
"innerportion",
"debug"
]
}
</templatedata>
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
[[Category:Graph Template Collection]]
}}</includeonly>
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
== Pie chart ==
You can add a pie chart with a call to this template.
== Examples ==
'''Example usage''':
{| class="wikitable"
! style="text-align: left;" | <nowiki>{{</nowiki>{{BASEPAGENAME}}<br>
| table = Wikimedia/all sites by browser family and major percent.tab<br>
| field1 = browserFamily<br>
| field2 = browserMajorVer<br>
| value = percent<br>
| width = 300<br>
<nowiki>}}</nowiki>'''
|-
| {{{{BASEPAGENAME}}
| table = Wikimedia/all sites by browser family and major percent.tab
| field1 = browserFamily
| field2 = browserMajorVer
| value = percent
| width = 300
}}
|}
=== Template Data ===
<templatedata>
{
"params": {
"width": {
"description": "Specify the width of the pie in number of pixels",
"default": "300",
"type": "number",
"suggested": true
},
"table": {
"description": "Data page name on Commons, without the Data: prefix. The table should contain at least three columns - major group, minor group, and numeric value",
"required": true,
"example": "Wikimedia/all sites by browser family and major percent.tab"
},
"field1": {
"description": "Id of the column shown as the inner circle",
"required": true,
"example": "browserFamily"
},
"field2": {
"description": "Id of the column shown as the outer circle",
"required": true,
"example": "browserMajorVer"
},
"value": {
"description": "Id of the column with the numeric value",
"required": true,
"example": "percent"
},
"colors": {
"label": "The colors of the slices",
"description": "The colors of the slices, specified as Vega defined rangeliteral. This can also be a list like [ \"red\", \"green\" ]",
"example": "\"category10\"",
"type": "string",
"default": "\"category10\""
},
"innerportion": {
"description": "Portion of the radius shown for the inner circle. Must be between 0 and 0.5",
"example": "0.25",
"type": "number",
"default": "0.35"
},
"debug": {},
},
"description": "This template adds a pie chart to the page using Graph extension",
"format": "inline",
"paramOrder": [
"table",
"field1",
"field2",
"value",
"width",
"colors",
"innerportion",
"debug"
]
}
</templatedata>
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
[[Category:Graph Template Collection]]
}}</includeonly>