Template:Fluc
For example, a positive Value
with a Type
of "maximize" (the default) will show the green upward arrow of {{increase}}, as that type assumes the goal is for the value to be maximized. Likewise, a negative Value
with a Type
of "maximize" produces the red downward arrow of {{decrease}}.
Inversely, a positive Value
with a Type
of "minimize" will show the red downward arrow of {{decrease}}, as that type assumes the goal is for the value to be minimized, but as a positive number, it's gone the wrong direction. Likewise, a negative Value
with a Type
of "minimize" produces the green upward arrow of {{increase}}, since a minimized value is sought and the value has moved in that direction.
Examples
{{fluc|47}}
or{{fluc|47|maximize}}
produces +47{{fluc|-47}}
or{{fluc|-47|maximize}}
produces −47{{fluc|47|minimize}}
produces +47{{fluc|-47|minimize}}
produces −47{{fluc|47|neutral}}
produces +47{{fluc|-47|neutral}}
produces −47{{fluc|0}}
produces no change{{fluc|-47|threshold=100}}
produces −47{{fluc|0|steady label=unchanged}}
produces unchanged{{fluc|-1000|custom label=$47 million}}
produces $47 million{{fluc|-1000|custom label=}}
produces (note: still includes the non-breaking space)
TemplateData
Takes a value and displays an increase, decrease, or steady symbol based on whether the value is positive, negative, or zero.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Value | 1 | The value being fed to the template
| Number | required |
Type | 2 type | The type of value being fed to the template, which affects the arrow color. Use "maximize", "minimize", or "neutral".
| Unknown | optional |
steady label | steady label | Specifies custom text to use alongside a steady result
| String | optional |
custom label | custom label | Specifies a custom value to display instead of the one being fed into the template | String | optional |
threshold | threshold | Specifies the maximum deviation from zero for which a steady symbol will display
| Number | optional |
See also
- Template:Tfluc-common-doc, the common documentation for the fluctuation icons