| Thistemplate is being discussed in accordance with Wikipedia'sdeletion policy. Help reach a consensus atits entry. |
%5B%5BWikipedia%3ATemplates+for+discussion%2FLog%2F2026+February+16%23Template%3AComposition+bar%2Fadvanced%2Finfobox%5D%5D
The advanced infoboxComposition bar template can be used to show a composition bar split into different colours. It's intended use is on the infoboxes for coalition governments or for use in infoboxes whereTemplate:Composition bar/advanced would otherwise be used.
The number of votes or percentages are entered using theparty1/party2/party3 parameters, with thepartycolor1/partycolor2/partycolor3 parameters allowing you to choose the colour of that part of the bar (using hexcode). In the examples below, political party templates are used to generate the specific colours (for example {{party color|Labour Party (UK)}} generates the following: #E4003B ).
The width of the whole box can be edited using theboxwidth parameter. If this parameter isn't used, it will default to 500px.
NOTE: This template does not currently add up your individualparty1/party2/party3 parameters for thetotal, so you should ensure that you add up these numbers and enter it as thetotal parameter. If the total of yourparty parameters does not reach thetotal, the extra space will be shown as white on the bar.
{{Composition_bar/advanced/infobox|divisionname=|total=|boxwidth=|party1=|partycolor1=|party2=|partycolor2=|party3=|partycolor3=|party4=|partycolor4=|party5=|partycolor5=|party6=|partycolor6=|party7=|partycolor7=|party8=|partycolor8=|party9=|partycolor9=|party10=|partycolor10=}}
Colors (/colours) can be defined using hexcode (e.g.#7CFC00) or as color names (e.g.LawnGreen). For a comprehensive list of X11 color names, seehere.
In the below example of an election result, a template (e.g.{{party color|Labour Party (UK)}}) is used to call the specific colour (in this case#DC241f).