Difference between revisions of "Template:Chart bar"

From Team Fortress Wiki
Jump to: navigation, search
(adding rollover ability - this template is rather underused given its utility)
Line 7: Line 7:
 
     line-height:{{{height|16px}}};
 
     line-height:{{{height|16px}}};
 
     {{{style1|}}}
 
     {{{style1|}}}
     ">&nbsp;{{formatnum:{{{1|<noinclude>33</noinclude>}}}}}&nbsp;</span><!--  
+
     ">&nbsp;{{#if:{{{hover|}}}|{{tooltip|{{formatnum:{{{1|<noinclude>33</noinclude>}}}}}|{{{hover}}}}}|{{formatnum:{{{1|<noinclude>33</noinclude>}}}}}}}&nbsp;</span><!--  
 
   --></div><noinclude>
 
   --></div><noinclude>
 
{{Template doc}}
 
{{Template doc}}
 
[[Category:Templates|Chart bar]]
 
[[Category:Templates|Chart bar]]
 
</noinclude>
 
</noinclude>

Revision as of 03:34, 5 May 2014

 33 

Template documentation [view] [edit] [history] [purge]

Draws a single horizontal percentage bar. Does not display the input value to a percentage. Default max value is 100.

{{Chart bar|33}}

Generates:

 33 


The max value can be edited.

{{Chart bar|360|max=500}}

Generates:

 360 


The bar color can be changed, and text can be made to appear on rollover.

{{Chart bar|33|hex=#c5c5c5|hover=Light grey}}
{{Chart bar|54|hex=#a4a4a4|hover=Dark grey}}
{{Chart bar|19|hex=#865839|hover=Brown}}

Generates:

 33 
 54 
 19 


The max width can be edited.

{{Chart bar|100|width=10%}}
{{Chart bar|100|width=30%}}
{{Chart bar|100|width=80%}}

Generates:

 100 
 100 
 100