Template:Progress bar

From StrategyWiki, the free strategy guide and walkthrough wiki

Usage

This template displays a coloured progress bar, visualising the parameters given.

  • progress: the amount of progress made (denominator)
  • total: the total progress allowable (numerator)
  • units: the units to display (optional; it's displayed as a percentage if this parameter isn't passed)
  • subunits: the subunits to display if progress is less than 1 (optional)
  • supraunits: the supraunits to display if progress is greater than or equal to total (optional)
  • ratio: the number of subunits in a unit and units in a supraunit, for use with subunits and supraunits

Simple examples

{{progress bar|progress=15|total=30}}

50%

{{progress bar|progress=69|total=70|units=GiB}}

69GiB

Ratio-based examples

{{progress bar|progress=0.001|total=70|units=MiB|subunits=KiB|supraunits=GiB|ratio=1024}}

1.024KiB

{{progress bar|progress=2048|total=4096|units=MiB|subunits=KiB|supraunits=GiB|ratio=1024}}

2GiB