Difference between revisions of "Template:Bar chart/bar/doc"
< Template:Bar chart | bar
Jump to navigation
Jump to search
imported>Plastikspork (doc) |
imported>Plastikspork (+) |
||
| Line 4: | Line 4: | ||
This template can be used to create bars for a horizontal bar graph. | This template can be used to create bars for a horizontal bar graph. | ||
== Usage == | == Usage == | ||
| − | :<code><nowiki>{{</nowiki>Bar graph/bar| ''data'' | ''total'' | width = ''width'' | width_units = ''width_units'' <nowiki>}}</nowiki></code> | + | :<code><nowiki>{{</nowiki>Bar graph/bar| ''data'' | ''total'' | width = ''width'' | width_units = ''width_units'' | color = ''color'' <nowiki>}}</nowiki></code> |
* <code>''width''</code> is a number which determines the maximum width of the bar | * <code>''width''</code> is a number which determines the maximum width of the bar | ||
* <code>''width_units''</code> are the units associated with the width (em, px, or %). The default is em. | * <code>''width_units''</code> are the units associated with the width (em, px, or %). The default is em. | ||
* <code>''data''</code> and <code>''total''</code> are used to determine the width of the bar using <code>''data''/''total''</code> to compute a percentage of <code>''width''</code>. | * <code>''data''</code> and <code>''total''</code> are used to determine the width of the bar using <code>''data''/''total''</code> to compute a percentage of <code>''width''</code>. | ||
* <code>''data''</code> is also used for the label on each bar. | * <code>''data''</code> is also used for the label on each bar. | ||
| + | * <code>''color''</code> is used to override the default bar color. | ||
== See also == | == See also == | ||
Revision as of 22:14, 13 March 2011
| This is a documentation subpage for Template:Bar chart/bar. It contains usage information, categories and other content that is not part of the original template page. |
This template can be used to create bars for a horizontal bar graph.
Usage
{{Bar graph/bar| data | total | width = width | width_units = width_units | color = color }}
widthis a number which determines the maximum width of the barwidth_unitsare the units associated with the width (em, px, or %). The default is em.dataandtotalare used to determine the width of the bar usingdata/totalto compute a percentage ofwidth.datais also used for the label on each bar.coloris used to override the default bar color.
See also
- {{Bar graph}} – uses this template to generate bar graphs.
- {{Infobox political party/seats}} – used for displaying the number of seats held by a political party.