Template:Graph:Stacked/sandbox
File:Test Template Info-Icon - Version (2).svg | This is a wrapper template for Template:Graph:Stacked/core, whose source is maintained at mw:Template:Graph:Stacked. This wrapper implements Wikipedia-specific styles on top of the original template. |
File:Sandbox.svg | This is the template sandbox page for Template:Graph:Stacked (diff). See also the companion subpage for test cases. |
This graph's main version resides at mw:Template:Graph:Stacked. Please make or suggest all the changes there, and copy it everywhere else (until the copying is automated)
{{Graph:Stacked | table=Bea.gov/GDP by state.tab | type=year | xField=year | barwidth=14 | series="TX","NY","CA" | title=Per state GDP | chartSizing=fit }} |
{{Graph:Stacked | table=Bea.gov/GDP by state.tab | type=year | xField=year | legend=States | series="TX","NY","CA" | title=Per state GDP | chartSizing=fit }} |
Per state GDP.
See or edit source data. |
Per state GDP.
See or edit source data. |
{{Graph:Stacked | tabletype=query | table=
|
{{Graph:Stacked | tabletype=query | table=
|
Paintings by decade.
See Wikidata query. |
Number of films by year and genre.
See Wikidata query. |
Other examples available at testcases page: Template:Graph:Stacked/testcases. Lua error in Module:TNT at line 112: mw.text.jsonEncode: Cannot use type 'boolean' as a table key.
Wikipedia-specific options added to this template:
Parameter | Description | Type | Status | |
---|---|---|---|---|
Thumbnail | thumb , 1 |
If set, will style the chart with a border that matches that used for image thumbnails | Boolean | optional |
Location | align , 2 |
Implements the left , right , center , and none alignment options as described at image thumbnails. Defaults to right if |thumb=true , otherwise defaults to none |
String | optional |
Caption | caption , 3 |
Adds a caption under the image. if |hideSource=true , it should include a link to the source data. Otherwise, make sure to end the caption with a period so it will display correctly with the source data after it. |
String | optional |
Hide source text | hideSource |
If set, hides the "See or edit source data" text under the chart. If set, make sure to include a link to the source data elsewhere (such as in the caption). | Boolean | optional |
Template calls can use the parameters by name, or they can be formatted similarly to normal image syntax. For example:
{{Graph:Stacked | thumb=true | align=left | caption=Per state GDP (via [[:Commons:Data:Bea.gov/GDP by state.tab]]) | table=Bea.gov/GDP by state.tab | type=year | xField=year | barwidth=14 | series="TX","NY","CA" | chartSizing=fit | hideSource=true }} |
{{Graph:Stacked | thumb | center | Per state GDP. | table=Bea.gov/GDP by state.tab | type=year | xField=year | legend=States | series="TX","NY","CA" | title=Per state GDP | chartSizing=fit }} |