Difference between revisions of "Template:Fluctuation formatter/doc"
imported>Mattbuck m (→Examples: for clarity) |
imported>Sdkb (→TemplateData: Clarify) |
||
| Line 35: | Line 35: | ||
"2": { | "2": { | ||
"label": "Type", | "label": "Type", | ||
| − | "description": "The type of value being fed to the template. Use \"maximize\", \"minimize\", or \"neutral\".", | + | "description": "The type of value being fed to the template, which affects the arrow color. Use \"maximize\", \"minimize\", or \"neutral\".", |
"default": "Maximize", | "default": "Maximize", | ||
"aliases": [ | "aliases": [ | ||
Revision as of 06:37, 14 September 2020
| This is a documentation subpage for Template:Fluctuation formatter. It contains usage information, categories and other content that is not part of the original template page. |
Contents
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
+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
+47{{fluc|-47|minimize}}produces
−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.
| 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