Neidio i'r cynnwys

Nodyn:Election box ranked choice bar/doc

Oddi ar Wicipedia

This template creates a horizontal two-part stacked bar, that graphically depicts the first round votes, the transferred votes, and combined, the maximum votes for a candidate in a ranked choice voting contest.

Usage

[golygu cod]

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

Parameter Name Required? Default Value Description
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

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. The value 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 to or larger than maxvotes.

Example: fullwidthvotes=49000

fullwidth optional 40 The maximum width of the stacked bar graph that corresponds to fullwidthvotes.

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.

Example: widthunit=em

Examples

[golygu cod]

{{Election box ranked choice bar | maxvotes=3333 | r1votes=2222 | fullwidthvotes=3500 }}


{{Election box ranked choice bar | maxvotes=3333 | r1votes=2222 | fullwidthvotes=3500 | fullwidth=50 | widthunit=em }}


See also

[golygu cod]