आकृति:Number and percent/doc
This is a documentation subpage for आकृति:Number and percent. It contains usage information, categories and other content that is not part of the original आकृति page. |
This template may be used to generate a number and a percentage of total. For the reverse, see {{percent and number}}.
Usage
सम्पादन करी{{number and percent|number|total}}
{{number and percent|number|total|decimals to round to (zero or greater)}}
Optional parameters
सम्पादन करीFor two-column table output, use |disp=table
To show the total with the table option, use |total=yes
To insert a line break before the parenthetical expression, use |disp=br()
To add a prefix to the numbers, use |prefix=
; for example, prefix=$
To add a suffix to the number, use |suffix=
; for example, suffix= units
To pad the result with zeros to achieve the desired precision, use |pad=yes
.
To specify a number n of significant figures for the percentage, use |sigfig=n
.
To specify a percentage suffix (e.g. per cent) other than %, use |%=suffix
(e.g. |%=per cent
).
To override the scientific notation default for very large and very small numbers, use |nonscinote=yes
.
To override the default right alignment in table mode, use |align=left
or |align=center
.
Basic examples
सम्पादन करी{{number and percent|3333|20000}}
→ ३,३३३ (१७%)
{{number and percent|3333|20000|3}}
→ ३,३३३ (१६.६६५%)
{{number and percent|3,333|20,000}}
→ ३,३३३ (१७%)
{{number and percent|3,333|20,000|3}}
→ ३,३३३ (१६.६६५%)
{{number and percent|111|1000|4|pad=yes}}
→ १११ (११.१000%)
{{number and percent|3333|20000|disp=br()}}
→ ३,३३३
(१७%)
Table display
सम्पादन करी{| class="wikitable sortable" |- ! Location !! Population !! Percentage |- | City A || {{number and percent|5000|12000|disp=table}} |- | City B || {{number and percent|6500|12000|disp=table}} |- | City C || {{number and percent|500|12000|disp=table}} |}
Location | Population | Percentage |
---|---|---|
City A | ५,००० | ४२% |
City B | ६,५०० | ५४% |
City C | ५०० | ४% |
See also
सम्पादन करी- {{percentage}}
- {{percent and number}}