This is a template for displaying a bar chart.
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Given multiple data rows that look like this: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
↔ Max. data columns:16↔ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{{Data bars
| columns =12|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec
| green| Apples|60|70|90|30|50|30|100|130|120|90|50|110
|yellow| Bananas|90|80|110|60|70|80|70|70|40|50|50|60|orange| Oranges|50|40|60|110|90|60|30|60|70|60|80|40}}
|
↕ Max. data rows:8↕ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Optional named parameters include title, scale and source.
|
|
Also, to center or to float a chart left or right, specify center, rightorleft in parameter align (aka float). For example:
Berries | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Total: 272 |
{{Data bars
| align = right
| columns =6| Jan| Feb| Mar| Apr| May| Jun
| blue|Berries|65|38|72|47|20|30}}
|
There are sixteen styles to choose from.
For example, here's one using style=8:
Horizontal, with borders, shading and visible detail. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
And here's exactly the same data in style=13, showing averages on the right instead of totals: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This template employs five "sub-templates." A table is created using the columns and rows of data.
If style is > 8, the data is passed along to other sub-templates to display averages instead of totals with the color key.