Template:Bar chart/testcases
Jump to navigation
Jump to search
Contents
Live template sans params
Country | Population |
---|---|
Tunisia | 3,000
|
Saudi Arabia | 2,500
|
Russia | 1,700
|
Jordan | 1,500
|
Morocco | 1,500
|
France | 1,200
|
Turkey | 1,000
|
Lebanon | 900
|
Germany | 700
|
Libya | 600
|
United Kingdom | 600
|
Indonesia | 500
|
Uzbekistan | 500
|
Pakistan | 500
|
Live with bar_width param only
- bar_width = 15
Country | Population |
---|---|
Tunisia | 3,000
|
Saudi Arabia | 2,500
|
Russia | 1,700
|
Jordan | 1,500
|
Morocco | 1,500
|
France | 1,200
|
Turkey | 1,000
|
Lebanon | 900
|
Germany | 700
|
Libya | 600
|
United Kingdom | 600
|
Indonesia | 500
|
Uzbekistan | 500
|
Pakistan | 500
|
Live with two params
- table_width = 30
- bar_width = 15
Country | Population |
---|---|
Tunisia | 3,000
|
Saudi Arabia | 2,500
|
Russia | 1,700
|
Jordan | 1,500
|
Morocco | 1,500
|
France | 1,200
|
Turkey | 1,000
|
Lebanon | 900
|
Germany | 700
|
Libya | 600
|
United Kingdom | 600
|
Indonesia | 500
|
Uzbekistan | 500
|
Pakistan | 500
|
Sandbox
- Sandbox bar_width params set to 15em
Country | |
---|---|
Tunisia | <graph>{"scales":[{"domain":{"data":"table","field":"v"},"name":"x","range":"width"},{"domain":{"data":"table","field":"t"},"type":"ordinal","name":"y","range":"height"}],"version":2,"marks":[{"type":"rect","properties":{"enter":{"y":{"scale":"y","field":"t"},"x":{"scale":"x","value":0},"x2":{"scale":"x","field":"v"},"height":{"scale":"y","band":true,"offset":-1,"strokeWidth":22}},"update":{"fill":{"b":{"value":242},"g":{"value":223},"r":{"value":206}}}},"from":{"data":"table"}},{"type":"text","properties":{"enter":{"baseline":{"value":"middle"},"align":{"value":"center"},"text":{"field":"e"},"y":{"scale":"y","offset":6,"field":"t"},"x":{"scale":"x","value":0},"dx":{"scale":"x","field":"v"},"angle":{"value":0},"fontSize":{"value":14},"fill":{"value":"black"}}},"from":{"data":"table"}}],"height":330,"autosize":{"type":"fit"},"data":[{"name":"table","values":[{"e":"3,000 ","t":" Tunisia","v":3000},{"e":"2,500 ","t":" Saudi Arabia","v":2500},{"e":"1,700 ","t":" Russia","v":1700},{"e":"1,500 ","t":" Jordan","v":1500},{"e":"1,500 ","t":" Morocco","v":1500},{"e":"1,200 ","t":" France","v":1200},{"e":"1,000 ","t":" Turkey","v":1000},{"e":"900 ","t":" Lebanon","v":900},{"e":"700 ","t":" Germany","v":700},{"e":"600 ","t":" Libya","v":600},{"e":"600 ","t":" United Kingdom","v":600},{"e":"500 ","t":" Indonesia","v":500},{"e":"500 ","t":" Uzbekistan","v":500},{"e":"500 ","t":" Pakistan","v":500}]}],"width":200}</graph> |
Saudi Arabia | |
Russia | |
Jordan | |
Morocco | |
France | |
Turkey | |
Lebanon | |
Germany | |
Libya | |
United Kingdom | |
Indonesia | |
Uzbekistan | |
Pakistan | |
Single data column
Two data columns
Two data columns with total
Many data columns with total
Individual bar color (future feature)
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)
Not implemented yet. |
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
|