(Translated by https://www.hiragana.jp/)
Template:Fluctuation formatter - 维基百科,自由的百科全书 とべ转到内容ないよう

Template:Fluctuation formatter

维基百科ひゃっか自由じゆうてき百科ひゃっかぜん
文档图示 板文いたぶん[查看] [编辑] [历史] [きよしじょ缓存]

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 +47
  • {{fluc|-47}} or {{fluc|-47|maximize}} produces −47
  • {{fluc|47|minimize}} produces +47
  • {{fluc|-47|minimize}} produces −47
  • {{fluc|0}} produces
  • {{fluc|-47|threshold=100}} produces −47
  • {{fluc|0|steady label=unchanged}} produces unchanged
  • {{fluc|47|neutral}} produces +47Neutral increase
  • {{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.

ばんさんすう[编辑いたすうすえ]

さんすう描述类型じょう
Value1

The value being fed to the template

しめせれい
-47
数字すうじ必需ひつじゅ
Type2 type

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

だま认值
Maximize
未知みち
steady labelsteady label

Specifies custom text to use alongside a steady result

だま认值
no change
しめせれい
unchanged
くし
custom labelcustom label

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

くし
thresholdthreshold

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

だま认值
0
数字すうじ

See also[编辑]