Jump to content

Шаблон:Onc

Мавод аз Википедиа — донишномаи озод
Ҳуҷҷатгузорӣ

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., &nbsp;kg, &nbsp;l, &nbsp;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}} 1 830 000 1 900 679,75 +3,86%
Mount Acme {{onc|2450000|2205678.37}} 2 450 000 2 205 678,37 −9,97%
Homeport {{onc|5120000|5589462.60}} 5 120 000 5 589 462,6 +9,17%
Longwood {{onc|930000|930027.92}} 930 000 930 027,92 0,00%
Meadowbrook {{onc|2450000|2450000.00}} 2 450 000 2 450 000 0,00%
Johnstown {{onc|3400000|3902340.05}} 3 400 000 3 902 340,05 +14,77%
Lakewood {{onc|2250000|2236005.56}} 2 250 000 2 236 005,56 −0,62%
Fox Hollow {{onc|1180000|1190345.32}} 1 180 000 1 190 345,32 +0,88%
Riverton {{onc|10550000|11236005.55}} 10 550 000 11 236 005,55 +6,50%
Timber Creek {{onc|1360000|1310948.30}} 1 360 000 1 310 948,3 −3,61%
Total {{onc|31520000|32951493.42|for='''}} 31 520 000 32951493.42|bold=on NA

See also