Difference between revisions of "Template:Onc/doc"
(Added rowspan.) |
m (1 revision) |
(No difference)
|
Latest revision as of 04:19, 22 March 2014
40px | This is a documentation subpage for Template:Onc. It contains usage information, categories and other content that is not part of the original template page. |
Use
This template creates three sortable cells in a row of a sortable table. The first cell displays a base value, the second cell displays a primary value, and the third cell displays the percent change from the base value to the primary value.
The base and primary values are displayed with thousands separators. 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:
{{onc|var1|var2|pre=|suf=|for=|rowspan=|date=}}
where:
- var1 is a real number representing the base value
- var2 is a real number representing the primary value
- 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 (dafault)
- '' = 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 | Budget | Actual | Dev |
---|---|---|---|---|
Big Meadow | {{onc|1830000|1900679.75}} | !B9855801734751 1,830,000 | !B9855422778566 1,900,679.75 | !D0032539121354 +3.86% |
Mount Acme | {{onc|2450000|2205678.37}} | !B9852884014174 2,450,000 | !B9853934543296 2,205,678.37 | !H9976946422094 −9.97% |
Homeport | {{onc|5120000|5589462.60}} | !B9845513350029 5,120,000 | !B9844636062954 5,589,462.60 | !D0023893210817 +9.17% |
Longwood | {{onc|930000|930027.92}} | !B9862570601348 930,000 | !B9862570301138 930,027.92 | !D0104135965872 +0.00% |
Meadowbrook | {{onc|2450000|2450000.00}} | !B9852884014174 2,450,000 | !B9852884014174 2,450,000.00 | !F 0.00% |
Johnstown | {{onc|3400000|3902340.05}} | !B9849607140104 3,400,000 | !B9848229130560 3,902,340.05 | !D0019122534297 +14.77% |
Lakewood | {{onc|2250000|2236005.56}} | !B9853735592258 2,250,000 | !B9853797984001 2,236,005.56 | !H9949199746126 −0.62% |
Fox Hollow | {{onc|1180000|1190345.32}} | !B9860189750035 1,180,000 | !B9860102459921 1,190,345.32 | !D0047367354739 +0.88% |
Riverton | {{onc|10550000|11236005.55}} | !B9838283635821 10,550,000 | !B9837653660388 11,236,005.55 | !D0027329954208 +6.50% |
Timber Creek | {{onc|1360000|1310948.30}} | !B9858770047422 1,360,000 | !B9859137386735 1,310,948.30 | !H9966776348651 −3.61% |
Total | {{onc|31520000|32951493.42|for='''}} | !B9827338671770 31,520,000 | !B9826894528582 32,951,493.42 | !D0030919040160 +4.54% |
See also
- Template:Noc functions the same as this template, but with the base and primary values reversed.
- Template:Onf 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.