Template:Percentage bar: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (Undo revision 184232 by KEMONO PANTSU (talk)) |
||
Line 1: | Line 1: | ||
<div style="border:{{{border|1px solid #9999CC}}}; padding:{{{padding|1px}}}; overflow:hidden; width:{{{width|50%}}}; margin: none; font-size:xx-small; text-align:right; {{{style|}}}"><!-- | |||
--><span style=" | |||
width: {{#expr: {{formatnum:{{{1|<noinclude>3</noinclude>0}}}|R}} / {{formatnum:{{{total|100}}}|R}} * 100}}%; | |||
height: {{{height|12px}}}; | |||
background:{{{color1|#75D9FA}}}; | |||
float:left; | |||
line-height:{{{height|12px}}}; | |||
{{{style1|}}} | |||
">{{#expr:floor({{formatnum:{{{1|<noinclude>3</noinclude>0}}}|R}} / {{formatnum:{{{total|100}}}|R}} * 100)}}% </span><!-- | |||
--><span style=" | |||
width:{{#expr: 100 - {{formatnum:{{{1|<noinclude>3</noinclude>0}}}|R}} / {{formatnum:{{{total|100}}}|R}} * 100}}%; | |||
height:{{{height|12px}}}; | |||
background:{{{color2|#FEFEFF}}}; | |||
float:left; | |||
{{{style2|}}} | |||
"> </span><!-- | |||
--></div><noinclude> | |||
{{Template doc}} | |||
[[Category:Templates|Percentage bar]] | |||
</noinclude> | |||
Latest revision as of 04:13, 13 June 2023
Note: portions of the template sample may not be visible without values provided. This is normal.
Documentation for Percentage bar
This template creates a simple status bar representing the completion percent of anything. By default this template assumes that the bar goes from 0% to 100%, so in use:
{{Percentage bar|25}}
generates:
However the top end can be overridden by specifying the total argument, so in this case:
{{Percentage bar|25|total=200}}
generates:
As 25 of 200 is 12%, rounded.
- This documentation is transcluded from Template:Percentage bar/doc.