| This is a documentation subpage for Template:Change2. It contains usage information, categories and other content that is not part of the original template page. |
This template takes compares two numbers, calculates the percent change, and formats the three numbers for inclusion in three columns of a table.
Use
This template has the following syntax:
{{Change2|number1|number2|numbers-dec|percent-dec|increase-color|decrease-color}}
where:
number1is the base number. If the base number is not known, use NA or  .number2is the target number. If the target number is not known, use NA or  .numbers-decis an optional number of decimal places in the formatted numbers. (default=0)percent-decis an optional number of decimal places in the formatted percent change. (default=2)increase-coloris an optional color for a percent increase. (default=green)decrease-coloris an optional color for a percent decrease. (default=red)
Example
The following syntax:
{{Change2|4301262|5029196}}
produces the following Wiki markup:
|align=right|4,301,262||align=right|5,029,196||align=right|+16.92%
which can be used in a table:
| base | target | % change |
|---|---|---|
| 4,301,262 | 5,029,196 | +16.92% |
See also
- This template is a simplified version of Template:Change.
- This template invokes Template:Changes/d.