Template:Bar percent: Difference between revisions
Template page
More actions
Created page with "<noinclude><table> </noinclude><tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;{{#if:{{{bg|}}}|background:{{{bg}}};}}">{{{1}}}</td> <td style="width: {{{barwidth|100px}}}; border-left: solid 1px silver; border-right: solid 1px silver;{{#if:{{{bg|}}}|background:{{{bg}}};}}"><div style="background:{{{2|gray}}}; width:{{{3|0}}}%; overflow: hidden;"> </div></td> <td colspan="{{#if:{{{note|}}}|1|2}}" style="padding-left: 1.2em; pad..." |
(No difference)
|
Latest revision as of 02:10, 19 February 2025
{{{1}}} | 0% |
For use with {{Bar box}}.
Usage
{{Bar percent|row label|colour|value (width in percents)|optional value label}}
If value label is not provided, it is constructed from the percentage and "%". This bar type also has the {{Bar percent 2}}
and {{Bar percent 3}}
variations which display more bars for the same row label.
Examples
{{Bar box
|float=right
|caption=distribution of stuff
|barwidth=200px
|bars=
{{bar percent|foo|red|30}}
{{bar percent|bar|green|40}}
{{bar percent|baz|blue|20}}
{{bar gap|qux}}
{{bar percent|bla|orange|8}}
{{bar percent|bla1|teal|2|1/50}}
}}