Template:Progress/doc

From OpenStreetMap Wiki
Jump to navigation Jump to search

This template can show the progress of e.g. a route inside a table cell with the same background color as in Template:Map status.

Feel free to discuss the ranges or the usage of more/other colors on Template talk:Progress.

How it will look like

Of course there will appear your percentage in front of the percent sign.

Range Display Comment
(empty) ? status unknown
0 to 19 11 % no or little data
20 to 39 29 % partial data
40 to 59 54 % halfway there
60 to 79 65 % largely complete
80 to 99 91 % almost complete
100 100 % complete
100+ 100 % complete (verified by another mapper)

Usage

Everything before:

{|
  [...]
|-
| Something

This is the table cell having a coloured background:

| {{Template:Progress|[here comes your percentage]}}

Everything after:

| Something
  [...]
|}

The percentage can be an integer, or a float, or a numeric expression (e.g. "53.2" works as well as "532/1000*100" which is converted and rounded to an integer).

If you don't want the percentage being displayed just add a second parameter with the alternate text (shouldn't be empty as it's not working then).

| {{Progress|232/1000*100}}
| {{Progress|23.2}}
| {{Progress|23}}
| {{Progress|232/1000*100|[[File:Picto Housenumbers.png]]}}
| {{Progress|23.2|[[File:Picto Housenumbers.png]]}}
| {{Progress|23|[[File:Picto Housenumbers.png]]}}

would become something like this:

23 % 23 % 23 % Picto Housenumbers.png Picto Housenumbers.png Picto Housenumbers.png

TemplateData

This is the TemplateData for this template used by VisualEditor.
TemplateData for Progress

This template can show the progress of e.g. a route inside a table cell.

Template parameters

ParameterDescriptionTypeStatus
PercentagePercentage

The percentage can be an integer, or a float, or a numeric expression (e.g. "53.2" works as well as "532/1000*100" which is converted and rounded to an integer).

Unknownoptional
Alternative TextAlternative Text

If you don't want the percentage being displayed just add a second parameter with the alternate text.

Unknownoptional