3,060
edits
(→Usage) |
Metriximor (talk | contribs) m (60 revisions imported from wikipedia:Template:Composition_bar/doc) |
||
(4 intermediate revisions by 4 users not shown) | |||
Line 1:
{{Documentation subpage}}
<!--
{{high-use| 4913 }}
This template displays the numeric composition of a thing in terms of its sub-units. For example, it is frequently used as part of {{tl|Infobox political party}} to show the number of seats a given political party holds in a legislature. A single line, flexible width version of this template is available at [[Template:Composition bar compact]]. A textless, single line, flexible width version of this template is available at [[Template:Composition bar textless]].
== Usage ==
Line 13:
: The second parameter is the total number of sub-units possible.
; bar-color
: (default is light grey) The third parameter is the background color of the left part of the bar - a valid [[web colors|web color]], which can be specified by name, as a [[hex triplet]] (#rrbbgg), or rgb triplet (rgb(0–255,0–255,0–255)).<br />In the case of political parties, most will have their logo color available in {{
Additional display options:
Line 24:
; per=...
: (default is false), when set to any value (true), adds a percentage to the bar as well
: (default is blank), may be used to add a reference/citation for the numbers.
Line 58:
| style="font-size: 95%"| <code><nowiki>{{Composition bar|90|100|#F0C|per=1}}</nowiki></code>
| {{Composition bar|90|100|#F0C|per=1}}
|-
| style="font-size: 95%"| <code><nowiki>{{Composition bar|0|26|hex=#00BFFF|per=1}}</nowiki></code>
| {{Composition bar|0|26|hex=#00BFFF|per=1}}
|}
Line 127 ⟶ 130:
<includeonly>{{When on basepage
| <!-- Categories
[[Category:Chart, diagram and graph templates]]
[[Category:Wikipedia progress templates]]
|