Template:Graph:Pie from row/doc
This is a documentation subpage for Template:Graph:Pie from row. It contains usage information, categories and other content that is not part of the original Template page. |
Pie chart
[edit]You can add a pie chart with a call to this template.
Examples
[edit]Example usage:
{{Graph:Pie from row | table = Bea.gov/GDP by state.tab | rowtest = year==2015 | series = "TX","CA","NY" | show = label | legend = Relative GDP | radius = 125 }} |
{{Graph:Pie from row | table = Bea.gov/GDP by state.tab | rowtest = year==2015 | series = "AL","AK","AZ","AR","CA","CO","CT","DE","DC","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY" | legend = - | radius = 125 }} |
See or edit source data. |
See or edit source data. |
Template Data
[edit]This template adds a pie chart to the page using Graph extension
Parameter | Description | Type | Status | |
---|---|---|---|---|
table | table | Data page name on Commons, without the Data: prefix. The table should contain series columns to plot, and the rowtest to select which row to use
| Unknown | required |
series | series | Data page name on Commons, without the Data: prefix. The table should contain xField column, like year or date, and one or more series columns to plot | String | required |
rowtest | rowtest | a condition to select just one row of the data for the display
| String | required |
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 |
The colors of the slices | colors | The colors of the slices, specified as Vega defined rangeliteral. This can also be a list like [ "red", "green" ]
| String | optional |
show | show | Show "label", "value" or "both" inside the pie chart | String | optional |
title | title | Optional title for the graph | String | optional |
debug | debug | no description | Unknown | optional |