Template:ChartDirectPop
This template allows to generate simple population plots using the Chart Feature. It is based on the transform functionality and uses the Template:ChartDirect and the commons module c:Module:Graph:Chart.
Copy templates
With default templates
{{ChartDirectPop
| type =
| x= | y1= | y1Title=
| thumb =
| align =
| width =
| border =
| style =
| caption =
| source =
}}
or With own template
{{ChartDirectPop
| chart =
| x= | y1= | y1Title=
| thumb =
| align =
| width =
| border =
| style =
| caption =
| source =
}}
or With Wikidata
{{ChartDirectPop
| chart =
| pageIds =
| thumb =
| align =
| width =
| border =
| style =
| caption =
| source =
}}
Examples
simple population plot
{{ChartDirectPop
|x=1980,1990,2000,2010,2020
|y1=98,87,201,252,325
}}
View chart definition.
simple population plot with wikidata
{{ChartDirectPop
|pageIds=Q84
}}
View chart definition.
{{ChartDirectPop
|pageIds=Q90
}}
View chart definition.
{{ChartDirectPop
|thumb
|pageIds=Q90
|xEnd=2014
}}
View chart definition.
simple bar population plot
{{ChartDirectPop
|x=1980,1990,2000,2010,2020
|y1=98,87,201,252,325
|type=bar
}}
View chart definition.
full width
{{ChartDirectPop
| width = 100%
|x=1980,1990,2000,2010,2020
|y1=98,87,201,252,325
|y1Title=Population
}}
View chart definition.
aligned and fixed width
{{ChartDirectPop
| align = right
| width = 400px
|x=1980,1990,2000,2010,2020
|y1=98,87,201,252,325
|y1Title=Population
}}
View chart definition.
aligned and fixed width thumbnail
{{ChartDirectPop
| thumb
| align = left
| width = 400px
|x=1980,1990,2000,2010,2020
|y1=98,87,201,252,325
|y1Title=Population
}}
View chart definition.
centered, fixed width, border, caption and source
{{ChartDirectPop
| chart = Template line population by year.chart
| x=1980,1990,2000,2010,2020
| y1=98,87,201,252,325
| y1Title=Population
| align = center
| width = 400px
| caption = Population of Exampleville
| source = per reference xyz
}}
Population of Exampleville Source: per reference xyz
date format shown
Note: dates are not yet fully supported by the chart extension, but they will be converted to local time format when display.
{{ChartDirectPop
| type = line
| x=1980-01-15,1980-07-15,1981-01-15,1981-07-15
| y1=10142,10796,11285,12409
| y1Title=Population
| xType = date
| width = 800px
| caption = Population of AnotherExampleVille
}}
Population of AnotherExampleVille View chart definition.
Further information
Create own templates
By using the parameter chart an own chart can be selected as template. See more information at Template:ChartDirect#Create own templates
Troubleshooting
see Template:ChartDirect#Troubleshooting
TemplateData
Includes a chart with source attribution and allows adjusting alignment, width, and border.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| x | x | Values x-Axis. Note: if a-Axis is not set, the template will try to create a wikidata chart based on the linked Wikidata-Item if the PageIds parameter is also not set. | Line | suggested |
| y1 | y1 y | Values first row y-Axis. Further parameters y2-y15 are supported
| Number | suggested |
| y1Title | y1Title yTitle | Legend value y-Axis. It is necessary for each y-Axis row (e.g. y1 and y1Title). Additional parameters y2-y15 are supported
| Line | optional |
| xType | xType | Data format of the x-Axis
| Line | optional |
| Use of predefined template charts | type | Data:...chart on Wikimedia Commons. Predefined charts based on the selected plot type. If parameter <code>chart</code> or <code>definition</code> is set, this parameter will be ignored.
| Line | optional |
| Display as thumbnail | thumb 1 | Set to any value to display in a gray box like an image thumbnail
| Line | optional |
| Alignment | align 2 | Chart alignment, either "left", "right", or "center"
| Line | optional |
| Width | width 3 | Width in pixels or percent
| Line | optional |
| Caption | caption 4 | Caption to display before the source information. Make sure to use ending punctuation.
| String | optional |
| Chart definition | chart definition | Chart on Wikimedia Commons, without the "Data:" prefix
| Line | required |
| Source attribution | source | Option to cite a source
| Line | optional |
| Border | border | Set to "1" to enable a border
| Boolean | optional |
| CSS styles | style | Additional CSS styles (beyond width and border)
| Line | optional |
| Hide source | hideSource | Set to any value to disable linking to the source
| Boolean | optional |
| pageIds | pageIds | Wikidata: Page Ids of wikidata pages to plot. If a wikidata chart is created and this parameter is not set, then it will automatically use the linked wikidata item. Be aware of limitations when plotting several wikidata items that may cause wrong plots.
| Line | optional |
| xEnd | xEnd | Wikidata: last year of plot.
| Number | optional |
| precision | precision | Wikidata: Option to Filter only for certain dates with Wikidata plots. See Template:WikidataChart for documentation of this parameter.
| Number | optional |
See also
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.