Welcome to the DFO World Wiki. With many major updates since the release of DFO, many items are missing. Visit Item Database Project to learn more.
Please remember to click "show preview" before saving the page.
Thanks for the updated logo snafuPop!
Difference between revisions of "Template:Horizontal scale"
(Created page with "<noinclude>{{documentation}}</noinclude><includeonly>{{#ifeq:{{#expr:{{{increment}}}*0}}|0|{{#ifexpr: {{Horizontal scale/Current number|from={{{from}}}|to={{{to}}}|increment=...") |
(changed increment variable name) |
||
Line 1: | Line 1: | ||
− | <noinclude>{{documentation}}</noinclude><includeonly>{{#ifeq:{{#expr:{{{ | + | <noinclude>{{documentation}}</noinclude><includeonly>{{#ifeq:{{#expr:{{{incrmnt}}}*0}}|0|{{#ifexpr: |
− | {{Horizontal scale/Current number|from={{{from}}}|to={{{to}}}| | + | {{Horizontal scale/Current number|from={{{from}}}|to={{{to}}}|incrmnt={{{incrmnt}}}|loop={{{loop}}} }} |
− | <= {{{to}}} - {{{ | + | <= {{{to}}} - {{{incrmnt}}}|<!-- Print all but last label in this fashion: |
.if so, then--><div style="float:left; overflow:visible; width:{{#expr: | .if so, then--><div style="float:left; overflow:visible; width:{{#expr: | ||
( | ( | ||
− | <!--25* | + | <!--25*incrmnt / (Largest number to print - smallest number to print), giving room for 3 ticks in between--> |
− | 99.100 <!--IE can't handle 100--> * {{{ | + | 99.100 <!--IE can't handle 100--> * {{{incrmnt}}} |
/ | / | ||
( | ( | ||
Line 14: | Line 14: | ||
) | ) | ||
) | ) | ||
− | }}%;">{{!}}<div name=Number style="font-size:86%; position:relative; left:-1.8em; width:3.6em; overflow:visible; text-align:center">{{Horizontal scale/Current number|from={{{from}}}|to={{{to}}}| | + | }}%;">{{!}}<div name=Number style="font-size:86%; position:relative; left:-1.8em; width:3.6em; overflow:visible; text-align:center">{{Horizontal scale/Current number|from={{{from}}}|to={{{to}}}|incrmnt={{{incrmnt}}}|loop={{{loop}}} }}</div></div>|<!-- |
.else-->{{#ifexpr: | .else-->{{#ifexpr: | ||
− | {{Horizontal scale/Current number|from={{{from}}}|to={{{to}}}| | + | {{Horizontal scale/Current number|from={{{from}}}|to={{{to}}}|incrmnt={{{incrmnt}}}|loop={{{loop}}} }} |
<= {{{to}}}|<!-- | <= {{{to}}}|<!-- | ||
− | .Last tick only --><div style="float:left; overflow:visible; width:0;">{{!}}<div name=Number style="font-size:86%; position:relative; left:-2em; width:4em; text-align:center">{{Horizontal scale/Current number|from={{{from}}}|to={{{to}}}| | + | .Last tick only --><div style="float:left; overflow:visible; width:0;">{{!}}<div name=Number style="font-size:86%; position:relative; left:-2em; width:4em; text-align:center">{{Horizontal scale/Current number|from={{{from}}}|to={{{to}}}|incrmnt={{{incrmnt}}}|loop={{{loop}}} }}</div></div>}} |
− | }}|<br>Please delete the line <code> | + | }}|<br>Please delete the line <code>incrmnt=</code>. It's preventing the template from working.}}</includeonly> |
Revision as of 09:20, 15 August 2018
Template Documentation view
As used in {{Horizontal timeline}}.
Example
{{Horizontal scale |from=1 |to=100 |increment=1 |loop=5 }}
produces
|
6