Template:Fluctuation formatter/doc

From blackwiki
< Template:Fluctuation formatter
Revision as of 06:37, 14 September 2020 by imported>Sdkb (→‎TemplateData: Clarify)
Jump to navigation Jump to search

Usage

Takes a value and displays an {{increase}}, {{decrease}}, or {{steady}} symbol with the value based on whether it is positive, negative, or zero. The type of value can be specified using the second parameter as "maximize", "minimize", or "neutral". Can be called using the shortcut {{Fluc}}.

Examples

  • {{fluc|47}} or {{fluc|47|maximize}} produces Increase +47
  • {{fluc|-47}} or {{fluc|-47|maximize}} produces Decrease −47
  • {{fluc|0}} produces Template:Steady no change
  • {{fluc|-47|threshold=100}} produces Template:Steady −47
  • {{fluc|0|steady label=unchanged}} produces Template:Steady unchanged
  • {{fluc|47|minimize}} produces Negative increase +47
  • {{fluc|-47|minimize}} produces Positive decrease −47
  • {{fluc|47|neutral}} produces Neutral increase +47
  • {{fluc|-1000|custom label=$47 million}} produces Decrease $47 million
  • {{fluc|-1000|custom label=}} produces Decrease  (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.

Template parameters

ParameterDescriptionTypeStatus
Value1

The value being fed to the template

Example
-47
Numberrequired
Type2 type

The type of value being fed to the template, which affects the arrow color. Use "maximize", "minimize", or "neutral".

Default
Maximize
Unknownoptional
Steady labelsteady label

Specifies custom text to use alongside a steady result

Default
no change
Example
unchanged
Stringoptional
Custom labelcustom label

Specifies a custom value to display instead of the one being fed into the template

Stringoptional
Thresholdthreshold

Specifies the maximum deviation from zero for which a steady symbol will display

Default
0
Numberoptional

See also