Difference between revisions of "Template:Election table/testcases"
imported>Jonesey95 (add bad test case) |
imported>MSGJ |
||
| Line 52: | Line 52: | ||
{{clear}} | {{clear}} | ||
| + | |||
| + | ==Spacing== | ||
| + | {{see also|Results of the 2016 Democratic Party presidential primaries}} | ||
| + | |||
| + | {{election table|2016DCDem|[[2016 District of Columbia Democratic primary|2016 Democratic Party's presidential nominating process in the District of Columbia]]<br />– Summary of results –}} | ||
| + | |- | ||
| + | ! rowspan="2" | Candidate | ||
| + | ! colspan="2" | Popular vote | ||
| + | ! colspan="3" | Estimated delegates | ||
| + | |- | ||
| + | ! Count | ||
| + | ! Percentage | ||
| + | ! <small>Pledged</small> | ||
| + | ! <small>Unpledged</small> | ||
| + | ! <small>Total</small> | ||
| + | |- {{party shading/Democratic}} | ||
| + | | style="text-align:left;"| [[Hillary Clinton 2016 presidential campaign|Hillary Clinton]] | ||
| + | | 76,704 | ||
| + | | 77.95% | ||
| + | | 16 | ||
| + | | 23 | ||
| + | | 39 | ||
| + | |- | ||
| + | | style="text-align:left;" | [[Bernie Sanders 2016 presidential campaign|Bernie Sanders]] | ||
| + | | 20,361 | ||
| + | | 20.69% | ||
| + | | 4 | ||
| + | | 2 | ||
| + | | 6 | ||
| + | |- | ||
| + | | style="text-align:left;" | [[Rocky De La Fuente|Roque "Rocky" De La Fuente]] | ||
| + | | 213 | ||
| + | | 0.22% | ||
| + | | || || | ||
| + | |- | ||
| + | | style="text-align:left;" | Under votes | ||
| + | | 611 | ||
| + | | 0.62% | ||
| + | | || || | ||
| + | |- | ||
| + | | style="text-align:left;" | Write-in | ||
| + | | 485 | ||
| + | | 0.49% | ||
| + | | || || | ||
| + | |- | ||
| + | | style="text-align:left;" | Over votes | ||
| + | | 24 | ||
| + | | 0.02% | ||
| + | | || || | ||
| + | |- | ||
| + | | style="text-align:left;"| Uncommitted | ||
| + | | colspan="2" {{n/a}} | ||
| + | | 0 | ||
| + | | 0 | ||
| + | | 0 | ||
| + | |- | ||
| + | ! Total | ||
| + | ! 98,398 | ||
| + | ! 100% | ||
| + | ! 20 | ||
| + | ! 25 | ||
| + | ! 45 | ||
| + | |- | ||
| + | | colspan="6" style="text-align:left;" | Source: ''[http://www.thegreenpapers.com/P16/DC-D The Green Papers]'', ''[https://www.dcboee.org/election_info/election_results/v3/2016/June-14-Primary-Election# District of Columbia Board of Elections – Official Primary Results]'' | ||
| + | |} | ||
== [[Template:{{TEMPLATENAME|testcases}}|Main template]], two parameters == | == [[Template:{{TEMPLATENAME|testcases}}|Main template]], two parameters == | ||
| Line 104: | Line 169: | ||
{{clear}} | {{clear}} | ||
| + | |||
== [[Template:{{TEMPLATENAME|testcases}}|Main template]], one parameter for title (wrong usage) == | == [[Template:{{TEMPLATENAME|testcases}}|Main template]], one parameter for title (wrong usage) == | ||
<code><nowiki>{{electiontable|Title to display}}</nowiki></code> | <code><nowiki>{{electiontable|Title to display}}</nowiki></code> | ||
Revision as of 10:53, 24 November 2020
| This is the template test cases page for the sandbox of Template:Election table. Script error: No such module "Purge". to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki, see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins with these links: |
Contents
Sandbox version, two parameters
{{electiontable/sandbox|Table template pagename|Title to display}}
{| class="wikitable " style="text-align:right; font-size: 95%; "
|+ Title to display
|+ Summary of Martian election results, 2020
|- style="background:#E9E9E9;"
! colspan="2" style="text-align:left;" | Parties
! Votes
! %
! ±
! Seats
! ±
|-
| style="background-color:#ff0000;" |
| style="text-align:left;" | The red party
| 6042
| 45.40
| -4.41
| 23
| -2
|-
| style="background-color:#00ff00;" |
| style="text-align:left;" | The green party
| 5678
| 42.67
| +1.23
| 21
| 0
|-
| style="background-color:#0000ff;" |
| style="text-align:left;" | Free Mars
| 345
| 2.59
| +2.59
| 1
| +1
|-
| style="background-color:#eeeeee;" |
| style="text-align:left;" | None of the above (unfilled seats)
| 1242
| 9.33
| +.59
| 5
| +1
|- style="background:#E9E9E9;"
! colspan="2" style="text-align:left;" | Total
! 13307
! style="text-align:center;" colspan="2" | 100%
! style="text-align:center;" colspan="2" | 50
|}
Spacing
| Candidate | Popular vote | Estimated delegates | |||
|---|---|---|---|---|---|
| Count | Percentage | Pledged | Unpledged | Total | |
| Hillary Clinton | 76,704 | 77.95% | 16 | 23 | 39 |
| Bernie Sanders | 20,361 | 20.69% | 4 | 2 | 6 |
| Roque "Rocky" De La Fuente | 213 | 0.22% | |||
| Under votes | 611 | 0.62% | |||
| Write-in | 485 | 0.49% | |||
| Over votes | 24 | 0.02% | |||
| Uncommitted | N/A | 0 | 0 | 0 | |
| Total | 98,398 | 100% | 20 | 25 | 45 |
| Source: The Green Papers, District of Columbia Board of Elections – Official Primary Results | |||||
Main template, two parameters
{{electiontable|Table template pagename|Title to display}}
| Parties | Votes | % | ± | Seats | ± | |
|---|---|---|---|---|---|---|
| The red party | 6042 | 45.40 | -4.41 | 23 | -2 | |
| The green party | 5678 | 42.67 | +1.23 | 21 | 0 | |
| Free Mars | 345 | 2.59 | +2.59 | 1 | +1 | |
| None of the above (unfilled seats) | 1242 | 9.33 | +.59 | 5 | +1 | |
| Total | 13307 | 100% | 50 | |||
Main template, one parameter for title (wrong usage)
{{electiontable|Title to display}}
| Parties | Votes | % | ± | Seats | ± | |
|---|---|---|---|---|---|---|
| The red party | 6042 | 45.40 | -4.41 | 23 | -2 | |
| The green party | 5678 | 42.67 | +1.23 | 21 | 0 | |
| Free Mars | 345 | 2.59 | +2.59 | 1 | +1 | |
| None of the above (unfilled seats) | 1242 | 9.33 | +.59 | 5 | +1 | |
| Total | 13307 | 100% | 50 | |||
Sandbox version, one parameter for title (wrong usage)
{{electiontable/sandbox|Title to display}}
{| class="wikitable " style="text-align:right; font-size: 95%; "
|+
|+ Summary of Martian election results, 2020
|- style="background:#E9E9E9;"
! colspan="2" style="text-align:left;" | Parties
! Votes
! %
! ±
! Seats
! ±
|-
| style="background-color:#ff0000;" |
| style="text-align:left;" | The red party
| 6042
| 45.40
| -4.41
| 23
| -2
|-
| style="background-color:#00ff00;" |
| style="text-align:left;" | The green party
| 5678
| 42.67
| +1.23
| 21
| 0
|-
| style="background-color:#0000ff;" |
| style="text-align:left;" | Free Mars
| 345
| 2.59
| +2.59
| 1
| +1
|-
| style="background-color:#eeeeee;" |
| style="text-align:left;" | None of the above (unfilled seats)
| 1242
| 9.33
| +.59
| 5
| +1
|- style="background:#E9E9E9;"
! colspan="2" style="text-align:left;" | Total
! 13307
! style="text-align:center;" colspan="2" | 100%
! style="text-align:center;" colspan="2" | 50
|}