Template:Results by (Denmark)/doc

From Wikipedia, the free encyclopedia
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)}}.

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 y to 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 X at polling station N.
 * Example: Party1_3 = 25.7 → Party 1 received 25.7% (or votes) at station 3.
Others / Oth_N
If Others = y is set, an extra column will be added for "Others". Use Oth_N to specify results for station N.

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]