Template:Bar: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
m (change default param things)
mNo edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><center>{{box|bgcolor=o|bdwidth=0|<center>
<includeonly><center>{{box|bgcolor=o|bdwidth=0|<center>
<b>&nbsp;{{#switch: {{#expr: floor ( {{{n|{{{1|1234}}} }}} * 10 / {{{goal|2000}}} ) }}
<b>&nbsp;&nbsp;&nbsp;{{#switch: {{#expr: floor ( {{{n|{{{1|1234}}} }}} * 10 / {{{goal|2000}}} ) }}
|0=
|0=
|1=I<font color=#BB0000>ııııiıııı</font>
|1=I<font color=#BB0000>ııııiıııı</font>
Line 38: Line 38:
|9=....:....!....:....!....:....!....:....!....:....!....:....!....:....!....:....!
|9=....:....!....:....!....:....!....:....!....:....!....:....!....:....!....:....!
|10=....:....!....:....!....:....!....:....!....:....!....:....!....:....!....:....!....:....!
|10=....:....!....:....!....:....!....:....!....:....!....:....!....:....!....:....!....:....!
}}&nbsp;</b><br>'''{{{n|{{{1|1234}}} }}} {{{things|newly created score pages this year out of}}} {{{goal|2000}}} {{{after|goal}}} ({{#expr: floor ( {{{n|{{{1|1234}}} }}}*100000/{{{goal|2000}}} round 1)/1000 }}%)</center>'''}}</center></includeonly>
}}&nbsp;&nbsp;&nbsp;</b><br>'''{{{n|{{{1|1232}}} }}} {{{things|newly created score pages this year: }}} {{{goal|2300}}} {{{after|goal}}} ({{#expr: floor ( {{{n|{{{1|1232}}} }}}*100000/{{{goal|2300}}} round 1)/1000 }}%)</center>'''}}</center></includeonly>
<noinclude>
<noinclude>
{{Bar}}
{{Bar}}
Creates a bar representing the fraction "<n> <things> <goal> <after>".  The label defaults are
Creates a bar representing the fraction "<n> <things> <goal> <after>".  The label defaults are
: n=1234
: n=1232
: things=newly created score pages this year
: things=newly created score pages this year
: goal=2000
: goal=2300
: after=annual goal
: after=annual goal
Normally this template might be invoked with something like:  
Normally this template might be invoked with something like:  
<pre>{{Bar|{{NewWorkCount}} }}
<pre>{{Bar|{{NewScoreCount}}|goal=4500|things=score pages with new editions: |after=goal}}
 
{{Bar|{{#expr: 1+ {{#time: z }}}}|goal=365|things=days elapsed out of|after=}}
{{Bar|{{#expr: 1+ {{#time: z }}}}|goal=365|things=days elapsed out of|after=}}
</pre>
</pre>
These invocations produce:
These invocations produce:
{{Bar|{{NewWorkCount}} }}
{{Bar|{{NewScoreCount}}|goal=4500|things=score pages with new editions: |after=goal}}
 
{{Bar|{{#expr: 1+ {{#time: z }}}}|goal=365|things=days elapsed out of|after=}}
{{Bar|{{#expr: 1+ {{#time: z }}}}|goal=365|things=days elapsed out of|after=}}



Latest revision as of 03:36, 3 October 2020


   IııııiııııIııııiııııIııııiııııIııııiııııIııııiııııIııııiııııIı...:....!....:....!....:....!....:....!   
1232 newly created score pages this year: 2300 goal (53.565%)

Creates a bar representing the fraction "<n> <things> <goal> <after>". The label defaults are

n=1232
things=newly created score pages this year
goal=2300
after=annual goal

Normally this template might be invoked with something like:

{{Bar|{{NewScoreCount}}|goal=4500|things=score pages with new editions: |after=goal}}

{{Bar|{{#expr: 1+ {{#time: z }}}}|goal=365|things=days elapsed out of|after=}}

These invocations produce:

   IııııiııııIııııiııııIııııiııııIııııiııııI....:....!....:....!....:....!....:....!....:....!....:....!   
1811 score pages with new editions: 4500 goal (40.244%)


   IııııiııııIııııiııııIııııiııııIııııi....!....:....!....:....!....:....!....:....!....:....!....:....!   
129 days elapsed out of 365 (35.342%)


{{Bar|n=977|goal=800|things=oboes available out of|after=needed}}

produces:

   IııııiııııIııııiııııIııııiııııIııııiııııIııııiııııIııııiııııIııııiııııIııııiııııIııııiııııIııııiııııIııııiııııIııııiııııIıı..:....!   
977 oboes available out of 800 needed (122.125%)

Note the green color for the 100% already attained.

{{Bar|n=37|goal=60|things=tenors recruited out of|after=positions available}}

produces:

   IııııiııııIııııiııııIııııiııııIııııiııııIııııiııııIııııiııııIı...:....!....:....!....:....!....:....!   
37 tenors recruited out of 60 positions available (61.666%)