Template:Noc
Use
This template creates three sortable cells in one row of a sortable table. The first cell displays a primary value, the second cell displays a base value, and the third cell displays the percent change from the base value to the primary value.
The primary and base values are displayed with thousands separators and optional prefix and suffix. A gain is indicated by the percentage increase to two decimals with a leading plus sign displayed in green. A loss is indicated by the percentage decrease to two decimals with a leading minus sign displayed in red. No change is indicated with 0.00% in the default color. This template is useful for displaying population, expenditures, prices, etc.
The syntax for this template is:
{{noc|var1|var2|pre=|suf=|for=|rowspan=|date=}}
where:
- var1 is a real number representing the primary value or NA
- var2 is a real number representing the base value or NA
- pre is an optional prefix for the base and primary values (e.g., $, £, €, ~, <, etc.)
- suf is an optional suffix for the base and primary values (e.g., kg, l, km, etc.)
- for is optional formatting:
- none = regular (default)
- '' = italics
- ''' = bold
- ''''' = bold italics
- rowspan is the optional rowspan (default=1)
- date is the optional date of last data update
The following sortable table illustrates the use of this template.
Region | Wikitext | 2010 | 2000 | Change |
---|---|---|---|---|
Big Meadow | {{noc|52364|50507|pre=£}} | £52,364 | £50,507 | +3.68% |
Mount Acme | {{noc|102456|102462|pre=£}} | £102,456 | £102,462 | −0.01% |
Homeport | {{noc|37750|35865|pre=£}} | £37,750 | £35,865 | +5.26% |
Longwood | {{noc|33760|25466|pre=£}} | £33,760 | £25,466 | +32.57% |
Junction City | {{noc|5000|0|pre=£}} | £5,000 | £0 | NA |
Meadowbrook | {{noc|86400|88542|pre=£}} | £86,400 | £88,542 | −2.42% |
Johnstown | {{noc|154809|150078|pre=£}} | £154,809 | £150,078 | +3.15% |
Lakewood | {{noc|36775|30745|pre=£}} | £36,775 | £30,745 | +19.61% |
Fox Hollow | {{noc|119034|118050|pre=£}} | £119,034 | £118,050 | +0.83% |
Riverton | {{noc|15085|15085|pre=£}} | £15,085 | £15,085 | 0.00% |
Timber Creek | {{noc|62075|72776|pre=£}} | £62,075 | £72,776 | −14.70% |
Total | {{noc|700508|689576|pre=£|for='''}} | £700,508 | £689,576 | +1.59% |
See also
- Template:Onc functions the same as this template, but with the base and primary values reversed.
- Template:Nof is a simplified version this template useful for lengthy tables.
- This template invokes Template:Nk and Template:Change.
- For help with this template, please contact the assigned maintenance group.