Template:PercentageMeter
From syn2cat - HackerSpace.lu
(Difference between revisions)
(Created page with '<includeonly> <table border="0" style="border: 1px solid black; margin: auto; text-align:center; padding:1px;" width="75%" cellspacing=2 cellpadding=3><tr> <td bgcolor="lightgr…') |
m |
||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
<table border="0" style="border: 1px solid black; margin: auto; text-align:center; padding:1px;" width="75%" cellspacing=2 cellpadding=3><tr> | <table border="0" style="border: 1px solid black; margin: auto; text-align:center; padding:1px;" width="75%" cellspacing=2 cellpadding=3><tr> | ||
− | |||
<td bgcolor="lightgreen" width="{{#expr: ({{{1|<noinclude>2</noinclude>0}}}/{{{total|100}}}) * 100}}%">Income: DKK {{{1|<noinclude>2</noinclude>0}}} ({{#expr: ({{{1|<noinclude>2</noinclude>0}}}/{{{total|100}}}) * 100 round 1}}%)</td> | <td bgcolor="lightgreen" width="{{#expr: ({{{1|<noinclude>2</noinclude>0}}}/{{{total|100}}}) * 100}}%">Income: DKK {{{1|<noinclude>2</noinclude>0}}} ({{#expr: ({{{1|<noinclude>2</noinclude>0}}}/{{{total|100}}}) * 100 round 1}}%)</td> | ||
− | <td bgcolor="#ff7f50" width="{{#expr: 100 - ({{{1|<noinclude>2</noinclude>0}}}/{{{total|100}}}) * 100}}%">All expenses: | + | <td bgcolor="#ff7f50" width="{{#expr: 100 - ({{{1|<noinclude>2</noinclude>0}}}/{{{total|100}}}) * 100}}%">All expenses: € {{{total|100}}} ({{#expr: (100 - ({{{1|<noinclude>2</noinclude>0}}}/{{{total|100}}}) * 100) round 1}}%)</td> |
</tr></table> | </tr></table> |
Revision as of 12:58, 7 December 2009
Percentage meter template as borrowed from labitat.dk (Thanks guys ;))
Should be used by a semantic inline query, but you may also use it manually:
{{PercentageMeter|<current amount>|total=<total amount>}}