Template:Election/doc

This template is one of many available for presenting election results; however, the eventual goal is that this template becomes the standard used throughout Wikipedia.

Usage
Important: While most of the template parameters are optional, if you use a field for one candidate, use that field for all candidates.

Header
The name for an election

The year an election took place; this occupies the top-left corner of the table. This field should always be used.

The width of the table &mdash; default value is 55%. If a page has multiple election boxes, make sure to keep the width consistent throughout.

Candidate rows
''Note that template parameters in this section have an "n" in their name. This should be substituted with the number of the candidate in order of appearance in the template. Up to 20 candidates are supported.''

Political party

In non-partisan elections, political parties can be left out at the discretion of the editor.

For "prepared" political parties. For example, if partyn is defined as "Democratic Party (US)", the color defined at is used and the short name defined at Democratic Party (US)/meta/shortname is used.

To use a custom political party and color:

for the name of a political party (linked at the user's discretion).

for the color of a political party. Hexadecimal codes or color names can be used. This value defaults to gray.

Candidate name

In elections that involve only political parties, the candidate name column can be left out.

The name of the candidate, linked at the user's discretion.

Winners should be bolded and incumbents should be italicized.

Votes received

The counted number of votes received. Example value:

The percentage of votes received. Example value:

The percent change in votes received by the party (or the person for independents) in the previous election. Example value:

Candidate rows (auxiliary)
Running mates

Individual running mates should only be added to an election box in situations where the running mate's candidacy is substantially different; for example, if there is a difference in political parties or votes received.

The name of the running mate.

The political party of the running mate.

For custom political parties (see above).

For custom political parties (see above).

Votes received.

Percent of votes received.

Percent change of votes received.

Party votes

For mixed-member proportional representation elections, such as those in New Zealand.

The number of votes received by a party.

The percent of votes received by a party.

The percent change of votes received by a party.

Majority
The majority in an election is the difference in votes received between first place and second place.

The difference in counted votes between first and second place.

The percent difference between first and second place.

The percent change between first and second place compared to the previous election.

For when running mates are involved:,  , and

For when party votes are involved:,  , and

Turnout
The number of voters in an election.

The percent of voter turnout, compared to the electorate (number of people eligible to vote) as a whole.

The percent change in an election compared to the prior election.

Winning political party
The winning political party. In legislative elections, this is the political party that won the most seats.

The name of the winning political party (for custom political parties; see above).

The color of the winning political party (for custom political parties; see above).

If the winner gained control from a losing party, be sure to add a "loser" parameter, whether  or   with.

Swing
While a standard in Commonwealth politics, swing is not typically calculated for United States elections. For that reason, it is optional.

The percent swing in an election.

The percent change in swing in an election.