Template:STV election graph/doc

This template creates a formatted bar chart to display results of elections that use the single transferable vote, similar to Graph:Chart.

About
Each stage of the election is shown by a column, and the number of votes each candidate received at that stage is shown by a coloured bar within that column.

Non-transferable votes are calculated automatically by subtracting the total number of votes in any given round from the number of first-preference votes.

The template can currently display elections with up to 15 stages and 20 candidates.

Usage
The first two parameters are Counts and Candidates, both of which must be filled in for the template to function properly.

After this, each set of parameters relate to a particular candidate.

Candidates should either be ordered by first-preference votes (with the candidate with the highest vote using the 1 set of parameters, the second highest using 2 and so on), or by order of election (with the candidate elected first using the 1 set of parameters, the candidate elected second 2 and so on. Unsuccessful candidates should be ranked in reverse order of elimination, with the candidate eliminated first using the last set of parameters).

You may wish to enclose the bar chart in an Image frame template, which includes a caption and lets text wrap around the image.

Examples
Inserting...

Produces...

Troubleshooting

 * A party is listed twice in the key
 * Make sure the party's name is spelt correctly, and that the colours are identical.
 * The "non-transferable votes" bar is in a colour other than black
 * Make sure the number of candidates is correct in the "Candidates" parameter.
 * I want to make a graph for an election that has more that 20 candidates, or more than 15 counts
 * Leave a message on the template's talk page, or add some extra parameters yourself. Be sure to test your edits in the sandbox before making any major changes.
 * I get a "syntax error" message when I use the template
 * Make sure there are no thousands separators, transcluded templates or duplicated parameters.