Template:Bar chart/testcases

< Template:Bar chart
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Live template sans params

List of nations by ISIL fighter origin (500 or more)
Country Population
File:Flag of Tunisia.svg Tunisia
3,000
File:Flag of Saudi Arabia.svg Saudi Arabia
2,500
File:Flag of Russia.svg Russia
1,700
File:Flag of Jordan.svg Jordan
1,500
File:Flag of Morocco.svg Morocco
1,500
File:Flag of France.svg France
1,200
File:Flag of Turkey.svg Turkey
1,000
File:Flag of Lebanon.svg Lebanon
900
File:Flag of Germany.svg Germany
700
File:Flag of Libya.svg Libya
600
File:Flag of the United Kingdom.svg United Kingdom
600
File:Flag of Indonesia.svg Indonesia
500
File:Flag of Uzbekistan.svg Uzbekistan
500
File:Flag of Pakistan.svg Pakistan
500

Live with bar_width param only

bar_width = 15
List of nations by ISIL fighter origin (500 or more)
Country Population
File:Flag of Tunisia.svg Tunisia
3,000
File:Flag of Saudi Arabia.svg Saudi Arabia
2,500
File:Flag of Russia.svg Russia
1,700
File:Flag of Jordan.svg Jordan
1,500
File:Flag of Morocco.svg Morocco
1,500
File:Flag of France.svg France
1,200
File:Flag of Turkey.svg Turkey
1,000
File:Flag of Lebanon.svg Lebanon
900
File:Flag of Germany.svg Germany
700
File:Flag of Libya.svg Libya
600
File:Flag of the United Kingdom.svg United Kingdom
600
File:Flag of Indonesia.svg Indonesia
500
File:Flag of Uzbekistan.svg Uzbekistan
500
File:Flag of Pakistan.svg Pakistan
500

Live with two params

table_width = 30
bar_width = 15
List of nations by ISIL fighter origin (500 or more)
Country Population
File:Flag of Tunisia.svg Tunisia
3,000
File:Flag of Saudi Arabia.svg Saudi Arabia
2,500
File:Flag of Russia.svg Russia
1,700
File:Flag of Jordan.svg Jordan
1,500
File:Flag of Morocco.svg Morocco
1,500
File:Flag of France.svg France
1,200
File:Flag of Turkey.svg Turkey
1,000
File:Flag of Lebanon.svg Lebanon
900
File:Flag of Germany.svg Germany
700
File:Flag of Libya.svg Libya
600
File:Flag of the United Kingdom.svg United Kingdom
600
File:Flag of Indonesia.svg Indonesia
500
File:Flag of Uzbekistan.svg Uzbekistan
500
File:Flag of Pakistan.svg Pakistan
500

Sandbox

Sandbox bar_width params set to 15em

Template:Bar chart/sandbox

Single data column

{{Bar chart}}
Annual revenue passenger statistics
Year Passengers (% change from prior year)
2003-04
110,649(+17.8%)
2004-05
130,429(+17.9%)
2005-06
138,547(+6.2%)
2006-07
138,844(+0.2%)
2007-08
149,544(+7.7%)
2008-09
148,435(-0.7%)
2009-10
168,147(+13.3%)
{{Bar chart/sandbox}}
Error: expandTemplate: template "Bar chart/sandbox" does not exist

Two data columns

{{Bar chart}}
Annual passenger and aircraft statistics
Fiscal year Revenue passengers Aircraft movements
2001-02
20,194
2,281
2002-03
22,057
2,633
2003-04
34,794
2,664
2004-05
49,234
2,754
2005-06
57,732
3,004
2006-07
64,881
2,956
2007-08
63,904
2,912
2008-09
54,718
2,811
2009-10
52,210
2,791
{{Bar chart/sandbox}}
Error: expandTemplate: template "Bar chart/sandbox" does not exist

Two data columns with total

{{Bar chart}}
Population of Simcity
Age 2000 2010
<18
123
101
19–60
234
105
>60
45
91
Total 402 297
{{Bar chart/sandbox}}
Error: expandTemplate: template "Bar chart/sandbox" does not exist

Two data columns with data missing from the end of the first column (use a dash instead; see below)

{{Bar chart}}
Annual passenger and aircraft statistics
Fiscal year Revenue passengers Aircraft movements
2001-02
20,194
2,281
2002-03
22,057
2,633
2003-04
34,794
2,664
2004-05
49,234
2,754
2005-06
57,732
3,004
2006-07
64,881
2,956
2007-08
63,904
2,912
2,811
2,791
{{Bar chart/sandbox}}
Error: expandTemplate: template "Bar chart/sandbox" does not exist

Two data columns with data missing from the end of the first column, using – for empty cells

{{Bar chart}}
Annual passenger and aircraft statistics
Fiscal year Revenue passengers Aircraft movements
2001-02
20,194
2,281
2002-03
22,057
2,633
2003-04
34,794
2,664
2004-05
49,234
2,754
2005-06
57,732
3,004
2006-07
64,881
2,956
2007-08
63,904
2,912
2008-09
2,811
2009-10
2,791
{{Bar chart/sandbox}}
Error: expandTemplate: template "Bar chart/sandbox" does not exist

Many data columns with total

{{Bar chart}}
Ethnic composition
Ethnicity 2011 2003 1991 1981 1971 1961
Albanians
41(0.13%)
25(0.08%)
103(0.37%)
83(0.35%)
83(0.45%)
67(0.44%)
Croat
662(2.15%)
798(2.42%)
630(2.28%)
702(3.01%)
1,195(6.5%)
1,544(10.18%)
Montenegrins
10,395(33.68%)
9,447(28.80%)
11,223(40.67%)
9,877(42.46%)
8,581(46.71%)
8,849(58.38%)
Muslims
283(0.92%)
299(0.91%)
332(1.2%)
152(0.65%)
82(0.44%)
31(0.2%)
Serbs
15,260(49.44%)
17,470(52.89%)
8,528(30.91%)
3,844(16.52%)
5,216(28.39%)
4,261(28.11%)
Yugoslavs
157(0.51%)
270(0.82%)
5,257(19.05%)
8,006(34.42%)
2,553(13.89%)
102(0.67%)
Undeclared
2,908(9.42%)
2,746(8.31%)
Others
1,158(3.75%)
1,979(5.99%)
1,516(5.52%)
594(2.59%)
658(3.62%)
303(2.02%)
Total 30,864 33,034 27,589 23,258 18,368 15,157
{{Bar chart/sandbox}}
Error: expandTemplate: template "Bar chart/sandbox" does not exist

Individual bar color (future feature)

Whole word quantity (source)
Rule Word counts
Data 1 test
20
G2
0
G3
0
G4
9
G5
1
G6
4
G7
3
G8
3
G9
0
G10
3
G11
5
G12
3
G13
124
G14
17

Sortable (future feature)

Whole word quantity
Rule Word counts
G1
0
G2
0
G3
0
G4
9
G5
1
G6
4
G7
3
G8
3
G9
0
G10
3
G11
5
G12
3
G13
124
G14
17