Template:Progression: Difference between revisions
From YATA Wiki
Jump to navigationJump to search
No edit summary Tag: Manual revert |
No edit summary |
||
Line 4: | Line 4: | ||
--><table width={{#if:{{{width|}}}|{{{width|}}}|50%}} align=center style="background:transparent"> | --><table width={{#if:{{{width|}}}|{{{width|}}}|50%}} align=center style="background:transparent"> | ||
<tr> | <tr> | ||
<td align=center>{{#if:{{{task|}}}|{{{task|}}}: }} | <td align=center>{{#if:{{{task|}}}|{{{task|}}}: }}<!--T:1--> <big>'''{{formatnum:{{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|100}}}round 1}}|0}}}}</>%'''</big> complete</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 19: | Line 19: | ||
{{documentation|content= | {{documentation|content= | ||
=== Syntax === <!--T:2--> | === Syntax === <!--T:2--> | ||
:{{tlx|Progression|''percent''}} | :{{tlx|Progression|''percent''}} | ||
<!--T:3--> | <!--T:3--> | ||
The | The <code>percent</code></> is a number between 0 and 100, without the trailing <code>%</code></>. | ||
:{{tlx|Progression|''param1''|''param2''}} | :{{tlx|Progression|''param1''|''param2''}} | ||
<!--T:4--> | <!--T:4--> | ||
Calculates the progression as a function of | Calculates the progression as a function of <code>param1/param2</code></> | ||
:{{tlx|Progression|''param1''|''param2''|task{{=}}''param3''}} | :{{tlx|Progression|''param1''|''param2''|task{{=}}''param3''}} | ||
<!--T:5--> | <!--T:5--> | ||
Calculates the progression as a function of | Calculates the progression as a function of <code>param1/param2</code></>, and displays a task label on the bar. | ||
=== Examples === <!--T:6--> | === Examples === <!--T:6--> | ||
==== 1 parameter (percent) ==== <!--T:7--> | ==== 1 parameter (percent) ==== <!--T:7--> | ||
{{tlx|Progression|0}}: | {{tlx|Progression|0}}: | ||
{{Progression|0}} | {{Progression|0}} | ||
Line 58: | Line 58: | ||
{{Progression|100}} | {{Progression|100}} | ||
==== 2 parameters ==== <!--T:8--> | ==== 2 parameters ==== <!--T:8--> | ||
{{tlx|Progression|0|250}}: | {{tlx|Progression|0|250}}: | ||
{{Progression|0|250}} | {{Progression|0|250}} | ||
Line 73: | Line 73: | ||
{{Progression|300|300}} | {{Progression|300|300}} | ||
==== 3 parameters ==== <!--T:9--> | ==== 3 parameters ==== <!--T:9--> | ||
{{tlx|Progression|0|250|task{{=}}Sorting articles}}: | {{tlx|Progression|0|250|task{{=}}Sorting articles}}: | ||
{{Progression|0|250|task=Sorting articles}} | {{Progression|0|250|task=Sorting articles}} |
Revision as of 12:40, 27 August 2024
<languages/>
Template documentation
Syntax
{{Progression|percent}}
The percent
</> is a number between 0 and 100, without the trailing %
</>.
{{Progression|param1|param2}}
Calculates the progression as a function of param1/param2
</>
{{Progression|param1|param2|task=param3}}
Calculates the progression as a function of param1/param2
</>, and displays a task label on the bar.
Examples
1 parameter (percent)
{{Progression|0}}
:
0</>% complete | |
|
{{Progression|0.5}}
:
0.5</>% complete | ||
|
{{Progression|1}}
:
1</>% complete | ||
|
{{Progression|36.7}}
:
36.7</>% complete | ||
|
{{Progression|100}}
:
100</>% complete | |
|
2 parameters
{{Progression|0|250}}
:
0</>% complete | |
|
{{Progression|100|250}}
:
40</>% complete | ||
|
{{Progression|200|300}}
:
66.7</>% complete | ||
|
{{Progression|300|300}}
:
100</>% complete | |
|
3 parameters
{{Progression|0|250|task=Sorting articles}}
:
Sorting articles: 0</>% complete | |
|
{{Progression|100|250|task=Sorting articles}}
:
Sorting articles: 40</>% complete | ||
|
[[Category:Utility templates{{#translation:}}]]