Template:Stacked horizontal bar/doc
Jump to navigation
Jump to search
This template can be used to display a percent distribution on a bar. It takes up to 11 parameters, and is capable of displaying 5 sections.
To use this template, you may use the simplified syntax, showing 3 bars, or the full syntax. Below is the simplified syntax.
{{Stacked horizontal bar |width = <!--Total width of the bar. Default is 33%. --> |pc1 = <!--Percent of the first section, default for all is 50. Do not at the % at the end. --> |pc2 = <!--Percent of the second section, example displays --> 33 |pc3 = <!--Percent of the third section, example displays --> 17 }}
Below is the full syntax.
{{Stacked horizontal bar |width = <!-- Total width of the bar. Default is 33%. --> |pc1 = <!-- Percent of the first section, default for all is 50. Do not at the % at the end. --> |colour1 = <!-- Colour of the first section, default is red. --> |pc2 = <!-- Percent of the second section. --> |colour2 = <!-- Colour of the second section, default is blue. --> |pc3 = <!-- Percent of the third section. --> |colour3 = <!-- Colour of the third section, default is green. --> |pc4 = <!-- Percent of the fourth section. --> |colour3 = <!-- Colour of the fourth section, default is yellow. --> |pc5 = <!-- Percent of the fifth section. --> |colour5 = <!-- Colour of the fifth section, default is black. --> }}
For example, {{Stacked horizontal bar|pc2=25|pc3=12.5|pc4=6.25|pc5=6.25}}
produces