Template:Progress bar/doc

Usage


This template draws a progress bar. By default, the  to supply as the parameter is the percent, from 0 to 100 (e.g. 1 would mean 1%, .1 would be 0.1%). The text label of the progress bar will always be rounded to the nearest tenth of a percent (rounding up if the hundreds digit is 5; e.g. 50.15 would round to 50.2%). If a value isn't specified or is invalid, the bar displays 0%. Values greater than 100% will display incorrectly, although the text label will be correct.

Optional parameters

 * = height of the progress bar in pixels; defaults to 2
 * = width of the progress bar; defaults to 75%
 * = message to display after %; defaults to: completed
 * = amount to use as the denominator (instead of 100), allows the template to compute the percentage on the fly
 * = no (or any value other than "yes", which is the default) suppresses the display of the percentage on the top line

Template data
{	"params": { "1": {			"label": "Value", "description": "The value that gets divided by the Total, or by 100 if it is missing", "type": "number", "required": true },		"width": { "label": "Width", "description": "Width of the bar" },		"header": { "label": "Header", "description": "Turns the header on or off", "type": "boolean", "default": "yes" },		"total": { "label": "Total", "description": "The total amount that the value is divided by", "type": "number", "default": "100" },		"text": { "label": "Text", "description": "The text that is displayed above the progress bar, after the percentage", "type": "string" },		"height": { "label": "Height", "description": "Height of the bar" },		"task": { "label": "Task", "description": "This is showed before the percentage", "example": "Completing stubs", "type": "string" }	},	"paramOrder": [ "1",		"total", "header", "task", "text", "width", "height" ],	"format": "inline", "description": "Makes a progress bar" }