Template:ChartDirectPop/doc

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
}}
PopulationYear5010015020025030035019801990200020102020ChartDirectPop/doc


simple population plot with wikidata

{{ChartDirectPop
|pageIds=Q84
}}
PopulationYear02,000,0004,000,0006,000,0008,000,00010,000,000180018501900195020002050London


{{ChartDirectPop
|pageIds=Q90
}}
PopulationYear2,100,0002,130,0002,160,0002,190,0002,220,0002,250,00019901995200020052010201520202025Paris


{{ChartDirectPop
|thumb
|pageIds=Q90
|xEnd=2014
}}
PopulationYear2,120,0002,140,0002,160,0002,180,0002,200,0002,220,0002,240,0002,260,000199019952000200520102015Paris

simple bar population plot

{{ChartDirectPop
|x=1980,1990,2000,2010,2020
|y1=98,87,201,252,325
|type=bar
}}
PopulationYear05010015020025030035019801990200020102020ChartDirectPop/doc


full width

{{ChartDirectPop
| width      = 100%
|x=1980,1990,2000,2010,2020
|y1=98,87,201,252,325
|y1Title=Population
}}
PopulationYear5010015020025030035019801990200020102020Population


aligned and fixed width

{{ChartDirectPop
| align      = right
| width      = 400px
|x=1980,1990,2000,2010,2020
|y1=98,87,201,252,325
|y1Title=Population
}}
PopulationYear5010015020025030035019801990200020102020Population


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
}}
PopulationYear5010015020025030035019801990200020102020Population


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
}}
PopulationYear5010015020025030035019801990200020102020Population
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
}}
PopulationYear10,00010,50011,00011,50012,00012,5001/15/19801/15/1981Population
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.

Template parameters

ParameterDescriptionTypeStatus
xx

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.

Linesuggested
y1y1 y

Values first row y-Axis. Further parameters y2-y15 are supported

Example
520,621,433
Numbersuggested
y1Titley1Title yTitle

Legend value y-Axis. It is necessary for each y-Axis row (e.g. y1 and y1Title). Additional parameters y2-y15 are supported

Example
population of Exampleville
Lineoptional
xTypexType

Data format of the x-Axis

Suggested values
number integer date string
Lineoptional
Use of predefined template chartstype

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.

Suggested values
bar line
Default
line
Lineoptional
Display as thumbnailthumb 1

Set to any value to display in a gray box like an image thumbnail

Suggested values
thumb
Example
thumb
Lineoptional
Alignmentalign 2

Chart alignment, either "left", "right", or "center"

Suggested values
left right center
Lineoptional
Widthwidth 3

Width in pixels or percent

Suggested values
400px 600px 50% 100%
Default
600px
Lineoptional
Captioncaption 4

Caption to display before the source information. Make sure to use ending punctuation.

Example
This is a chart caption.
Stringoptional
Chart definitionchart definition

Chart on Wikimedia Commons, without the "Data:" prefix

Example
Example.chart
Linerequired
Source attributionsource

Option to cite a source

Example
some reference
Lineoptional
Borderborder

Set to "1" to enable a border

Suggested values
1
Example
1
Booleanoptional
CSS stylesstyle

Additional CSS styles (beyond width and border)

Example
border-width:5px;
Lineoptional
Hide sourcehideSource

Set to any value to disable linking to the source

Suggested values
1
Example
1
Booleanoptional
pageIdspageIds

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.

Example
Q84
Lineoptional
xEndxEnd

Wikidata: last year of plot.

Example
2015
Numberoptional
precisionprecision

Wikidata: Option to Filter only for certain dates with Wikidata plots. See Template:WikidataChart for documentation of this parameter.

Example
9
Numberoptional

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.

  1. 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:
  2. 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.
  3. 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.
  4. 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.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.