Template:Election box ranked choice candidate with party link

From WWII Archives

[[{{{party}}}|{{{party}}}]] {{{candidate}}} {{{maxround}}} {{{maxvotes}}} {{{maxvotespercent}}}%
File:Test Template Info-Icon.svg Template documentationview · edit · history · purge ]

This template adds a row for a candidate in a summary table for a ranked choice voting contest. The row describes the candidate's party, name, and maximum number of votes. The row also includes a stacked, two-part bar graph representing the number of first round votes, the number of transferred votes, and the maximum number of votes.

Usage

A candidate row created by this template can be in a summary table that is started by a template such as Template:Election box ranked choice begin. After the starting template, this template can be used one or more times, once for each candidate row. Then the table is completed with a closing template such as Template:Election box ranked choice end.

The following table describes the parameters to use with this template.

Parameter Name Required? Default Value Description
party required undefined The (Wiki page title) name of candidate's party. That page should also have subpages /meta/color and /meta/shortname for use in the table.

Example: party=Democratic Party (United States)

candidate required undefined The name of the candidate, preferably in the form of a wiki link to the candidate's page.

Example: candidate=[[John Smith]]

maxround required undefined The round in which the candidate was declared eliminated or the winner. The last round in which votes were counted for the candidate. The round corresponding to the maxvotes vote count.

Example: maxround=5

maxvotes required undefined The maximum number of votes that were counted for the candidate. The number of votes counting for the candidate in round maxround. This should be provided without commas or other display formatting.

Example: maxvotes=47381

maxvotespercent required undefined The percent of votes that maxvotes represents as a share of all votes counting for any candidate in that round maxround. This should be provided in the format it will be displayed, but without a trailing percent sign character, which will be appended by the template.

Example: maxpercent=27.23

r1votes required undefined The number of votes that counted for the candidate in the first round. This should be provided without commas or other display formatting. This should be less than maxvotes.

Example: r1votes=29618

fullwidthvotes required undefined The number of votes corresponding to the maximum width of the stacked bar graph. This should be equal or larger than the maxvotes value of every row in the table and should be the same for every row in the table.

Example: fullwidthvotes=49000

fullwidth optional 40 The maximum width of the stacked bar graph that corresponds to fullwidthvotes. This number, with widthunit appended, should be less than or equal to the barwidth value used for the column heading in the starting template. This value should be the same for every row in the table.

Example: fullwidth=20

widthunit optional ex The units for fullwidth and the units for specifying the width of the bar graph components. A unit that automatically varies with font size and that allows fractional units is recommended. This value should be the same for every row in the table.

Example: widthunit=em

Examples

See Template:Election box ranked choice begin for examples.

See also