Template:Composition bar/doc
Appearance
| Parts of this documentation were copied from the English Wikipedia article on this module. Note that the documentation could have been edited since copying. |
The Composition bar template displays the numeric composition of a thing in terms of its sub-units. It can also be used as a meta template.
Parameters
1- the number of subunits2- the total number of subunits possible3- (default is #C0D1E9) The third parameter is the background color of the left part of the bar - a valid web color, which can be specified by name, as a hex triplet (#rrbbgg), or rgb triplet (rgb(0–255,0–255,0–255)).background-color- (default is transparent) is the background color of the right part of the bar - a valid web color.border- (default is #aaa) is the color of the border, or "none" for no borderwidth- (default is 100px) a width value for the bar, such as "100%" or "8em" (unitless numbers are interpreted as px)per- (default is false), when set to any value (true), adds a percentage to the bar as wellref- (default is blank), may be used to add a reference/citation for the numbers.
Examples
| Code | Result |
|---|---|
{{Composition bar|4|16}}
|
4 / 16
|
{{Composition bar|90|100|#F0F0F0|per=1|background-color=#F00}}
|
90 / 100 (90%)
|