Template:Bar box/doc

This  template documentation is transcluded for all Bar box/doc including templates'' [ [ edit] ].

Bar box, bar percent, bar pixel, bar stacked and bar gap are a family of templates for construction of horizontal bar charts.

Chart contents
The chart can contain any number of bars. There are four types:

Percentage bar If value label is not provided, it is constructed from the percentage and "%". This bar type also has the bar percent 2 and bar percent 3 variations which display more bars for the same row label.

Pixel bar If value label is provided, value suffix is ignored. Otherwise, the value label is constructed from the value and the value suffix. This is used as shorthand. Both following examples give identical results: This bar type also has the bar pixel 2 variation which displays two bars for the same row label.

Stacked bars sets the "tooltip" of the respective bar and is viewed when hovered over. sets the text-alignment (left, center, right or default) for each column based on the respective initials. All parameters are optional, but if  is not supplied,   has no effect. Use a custom toggle as the default toggle will distort the chart (see the last example).

Gap bar Omitting the  generates a blank row. Another useful  is   which produces a horizontal line.

Examples
Using bar percent:

Using bar pixel:

Using bar percent 2:

Using bar stacked: