Difference between revisions of "Template:Fluctuation formatter/doc"

From blackwiki
Jump to navigation Jump to search
imported>Sdkb
(new doc)
imported>Sdkb
(expanding doc)
Line 2: Line 2:
 
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata -->
 
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata -->
 
== Usage ==
 
== Usage ==
 +
Takes a value and displays an {{tl|increase}}, {{tl|decrease}}, or {{tl|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 {{tl|Fluc}}.
  
 +
==Examples==
 +
* {{tlx|fluc|47}} or {{tlx|fluc|47|maximize}} produces {{fluc|47}}
 +
* {{tlx|fluc|-47}} or {{tlx|fluc|-47|maximize}} produces {{fluc|-47}}
 +
* {{tlx|fluc|0}} produces {{fluc|0}}
 +
* {{tlx|fluc|0|steady label{{=}}unchanged}} produces {{fluc|0|steady label=unchanged}}
 +
* {{tlx|fluc|47|minimize}} produces {{fluc|47|minimize}}
 +
* {{tlx|fluc|47|neutral}} produces {{fluc|47|neutral}}
 +
 +
== TemplateData ==
  
 
<includeonly>{{sandbox other||
 
<includeonly>{{sandbox other||
Line 21: Line 31:
 
"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. Use \"maximize\", \"minimize\", or \"neutral\".",
"default": "Maximize"
+
"default": "Maximize",
 +
"aliases": [
 +
"type"
 +
]
 +
},
 +
"steady label": {
 +
"description": "Specifies custom text to use alongside a steady result",
 +
"example": "unchanged",
 +
"default": "no change"
 
}
 
}
 
},
 
},

Revision as of 03:59, 16 August 2020

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

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. 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
Unknownoptional