Module:Croatian population data graph/doc: Difference between revisions
Added the page to Category:Module documentation pages |
some module documentation |
||
Line 1: | Line 1: | ||
{{Uses TemplateStyles|Template:Croatian population data graph/styles.css}} |
|||
{{Not English}} |
|||
This module implements the {{tl|Croatian population data graph}} template. |
|||
{{Improve documentation|date=August 2024}}<noinclude> |
|||
It processes parameters in the format <code>pYYYY=value</code> taken from the template, and displays the population data as a bar chart. Here, YYYY represents a year and ''value'' the corresponding population. In older syntax, the template also accepts up to 99 of annum/population pairs: <code>aN=YYYY | pN=value</code>. |
|||
The chart is rendered as a table with bars made of {{tag|div}} elements, having the heights proportional to each ''value'' for a given year ''YYYY''. |
|||
Other parameters taken from the template (or module invocation) include, in Croatian (for historical reasons) or English: |
|||
{|class="wikitable" |
|||
!English!!Croatian |
|||
|- |
|||
|title|| naslov |
|||
|- |
|||
|entity|| područje |
|||
|- |
|||
|note|| napomena |
|||
|- |
|||
|sources|| izvori |
|||
|- |
|||
|censuses=HRV|| popisi=HRV |
|||
|} |
|||
The following labels can be modified only from the module invocation: |
|||
{|class="wikitable" |
|||
!parameter!!English text!!Croatian text |
|||
|- |
|||
|trend||<code>Population trends </code>|| <code>Kretanje broja stanovnika od </code> |
|||
|- |
|||
|trendsep||<code>–</code> || <code><nowiki> do </nowiki></code> |
|||
|- |
|||
|ord||<code>population</code>|| <code>broj stanovnika</code> |
|||
|- |
|||
|nb||<code><nowiki>'''Note: '''</nowiki></code>||<code><nowiki>'''Napomena:'''</nowiki></code> |
|||
|- |
|||
|ref||<code><nowiki>'''Sources: '''</nowiki></code>||<code><nowiki>'''Izvori:'''</nowiki></code> |
|||
|- |
|||
|YYYYsuf||||<code>.</code> |
|||
|} |
|||
==Examples== |
|||
<syntaxhighlight lang="wikitext">{{Croatian population data graph|p2001=1|p2011=3|p2021=5|title=Title|entity=Entity|note=Note|sources=Sources}}</syntaxhighlight> |
|||
<syntaxhighlight lang="wikitext">{{Croatian population data graph|a1=2001|p1=1|a2=2011|p2=3|a3=2021|p3=5|title=Title|entity=Entity|note=Note|sources=Sources}}</syntaxhighlight> |
|||
{{Croatian population data graph|p2001=1|p2011=3|p2021=5|title=Title|entity=Entity|note=Note|sources=Sources}} |
|||
When <code>censuses=HRV</code> only the years of the known Croatian population censuses are shown (1857, 1869, 1880, 1890, 1900, 1910, 1921, 1931, 1948, 1953, 1961, 1971, 1981, 1991, 2001, 2011, 2021), starting and ending with the years for which data are given. |
|||
If unset, any years can be shown. |
|||
<syntaxhighlight lang="wikitext">{{Croatian population data graph|censuses=|p2025=5|p2020=9|p2015=12|p2010=8|p2005=4|p2000=2|p1995=1|p1990=0|title=Title|entity=Entity|note=Note|sources=Sources}}</syntaxhighlight> |
|||
{{Croatian population data graph|censuses=|p2025=5|p2020=9|p2015=12|p2010=8|p2005=4|p2000=2|p1995=1|p1990=0|title=Title|entity=Entity|note=Note|sources=Sources}} |
|||
<noinclude> |
|||
[[Category:Module documentation pages]] |
[[Category:Module documentation pages]] |
||
</noinclude> |
</noinclude> |
Latest revision as of 13:28, 28 March 2025
![]() | This module uses TemplateStyles: |
This module implements the {{Croatian population data graph}} template.
It processes parameters in the format pYYYY=value
taken from the template, and displays the population data as a bar chart. Here, YYYY represents a year and value the corresponding population. In older syntax, the template also accepts up to 99 of annum/population pairs: aN=YYYY | pN=value
.
The chart is rendered as a table with bars made of <div>...</div>
elements, having the heights proportional to each value for a given year YYYY.
Other parameters taken from the template (or module invocation) include, in Croatian (for historical reasons) or English:
English | Croatian |
---|---|
title | naslov |
entity | područje |
note | napomena |
sources | izvori |
censuses=HRV | popisi=HRV |
The following labels can be modified only from the module invocation:
parameter | English text | Croatian text |
---|---|---|
trend | Population trends |
Kretanje broja stanovnika od
|
trendsep | – |
do
|
ord | population |
broj stanovnika
|
nb | '''Note: ''' |
'''Napomena:'''
|
ref | '''Sources: ''' |
'''Izvori:'''
|
YYYYsuf | .
|
Examples
[edit]{{Croatian population data graph|p2001=1|p2011=3|p2021=5|title=Title|entity=Entity|note=Note|sources=Sources}}
{{Croatian population data graph|a1=2001|p1=1|a2=2011|p2=3|a3=2021|p3=5|title=Title|entity=Entity|note=Note|sources=Sources}}
population | 1 | 3 | 5 |
2001 | 2011 | 2021 |
When censuses=HRV
only the years of the known Croatian population censuses are shown (1857, 1869, 1880, 1890, 1900, 1910, 1921, 1931, 1948, 1953, 1961, 1971, 1981, 1991, 2001, 2011, 2021), starting and ending with the years for which data are given.
If unset, any years can be shown.
{{Croatian population data graph|censuses=|p2025=5|p2020=9|p2015=12|p2010=8|p2005=4|p2000=2|p1995=1|p1990=0|title=Title|entity=Entity|note=Note|sources=Sources}}
population | 1 | 2 | 4 | 8 | 12 | 9 | 5 | |
1990 | 1995 | 2000 | 2005 | 2010 | 2015 | 2020 | 2025 |