• Home
  • Random
  • Recent changes
  • Special pages
  • Settings
  • About MOASSpedia
  • Disclaimers
MOASSpedia
  • 216.73.216.213
  • Talk
  • Watchlist
  • Contributions
  • Log in

Template:Fluctuation formatter

Template Discussion
  • Language
  • Watch
  • History
  • Edit
    • Page information
    • Permanent link
    • What links here
(Redirected from Template:Fluc)
Template documentation[view] [edit] [history] [purge]

Contents

  • 1 Usage
  • 2 Examples
  • 3 TemplateData
  • 4 See also

Usage

Takes a value and displays an {{increase}}, {{decrease}}, or {{steady}} symbol with the value based (by default) 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}}. It's meant to be used to show a fluctuation snapshot, where the provided value indicates a move up (positive) or down (negative), or possibly held steady (zero = no change) in relationship to some earlier measurement.

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

  • Template:Tfluc-common-doc, the common documentation for the fluctuation icons
The above documentation is transcluded from Template:Fluctuation formatter/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://moasspedia.org/w/index.php?title=Template:Fluctuation_formatter&oldid=16902"
Categories:
  • Direction-related icon templates
  • Wikipedia formatting and function templates
Last edited on 7 February 2022, at 13:00

MOASSpedia

Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • This page was last edited on 7 February 2022, at 13:00.
  • Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • Privacy policy
  • About MOASSpedia
  • Disclaimers
  • Desktop