Template:Results by (Denmark)/doc
Jump to navigation
Jump to search
-- This is the documentation page for Module:ResultsByDenmark.
Purpose
[edit source]Module:ResultsByDenmark is used to generate result tables for elections broken down by polling stations or divisions in Denmark. The module is designed to work with the template {{Results by (Denmark)}}.
Usage
[edit source]The basic structure is:
{{#invoke:ResultsByDenmark|renderPoll
|% = y
|Party1 = [[Social Democrats (Denmark)|A]]
|Party2 = [[Venstre (Denmark)|V]]
|Party3 = [[Green Left (Denmark)|F]]
...
|Poll_station1 = Skagen
|Party1_1 = 35.6
|Party2_1 = 27.3
|Party3_1 = 10.2
...
}}
Parameters
[edit source]%- Use
yto display values as percentages. If omitted, raw vote counts are shown.
Party1 … Party20- Defines the parties to be displayed in the table. Can be entered as a wikilink
Abbreviation.
* Example: A.
Poll_stationN- Name of the polling station. If the station is included in the module’s predefined list (
p.stations), it will be displayed with the proper wikilink. Otherwise, the raw text will be linked automatically.
PartyX_N- Result for party
Xat polling stationN.
* Example: Party1_3 = 25.7 → Party 1 received 25.7% (or votes) at station 3.
Others/Oth_N- If
Others = yis set, an extra column will be added for "Others". UseOth_Nto specify results for stationN.
Formatting
[edit source]- The party colors are automatically fetched from Module:Political party or from corresponding
Template:Party shading/<party>. - The highest value in each row is highlighted with the party’s color. For "Others", the highlight is shown in grey.
Example
[edit source]{{Results by (Denmark)
|% = y
|Party1 = [[Social Democrats (Denmark)|A]]
|Party2 = [[Conservative People's Party (Denmark)|C]]
|Party3 = [[Green Left (Denmark)|F]]
|Poll_station1 = Skagen
|Party1_1 = 35.6
|Party2_1 = 28.3
|Party3_1 = 9.5
|Poll_station2 = Frederikshavn (Arena Nord)
|Party1_2 = 31.1
|Party2_2 = 29.7
|Party3_2 = 11.0
}}
See also
[edit source]