This module is directly based on the templates de:Vorlage:Sitzverteilung and fr:Modèle:Répartition des sièges.
Usage
editThis template uses Lua: |
{{seats diagram
|width =
|float =
|background =
|title =
|n1 =
|p1 =
|c1 =
|n2 =
|p2 =
|c2 =
}}
- Width
- Width in pixels of the created image; the corresponding height is calculated automatically. Predefined values: 1–28 seats, 280px; 29–100 seats, 300px; over 101 seats, 350px.
- Float
- If not empty (possible values are "left", "center", and "right"), will generate the diagram in a floating thumbnail, with the number of seats by party listed below.
- Background
- Defines the background color.
- Title
- If in thumbnail, sets a title above the diagram.
- n1, n2, …
- Number of seats of each group or party
- c1, c2, …
- Color of the seats for each group or party, indicated as a hex color (3- or 6-digits). Predefined value: #CCC.
- p1, p2, …
- Name of the party to use the Module:Political party template (automatic loading of the color)
Use examples
edit{{Parliament diagram
|n1=522|c1=#E89600
|n2=152|c2=#59B1AA
|n3= 20|c3=#D64757
}}
{{Parliament diagram
|float=right
|title=Test title
|n1=60|p1=Historical Far Left
|n2=620|p2=Historical Left (Italy)
|n3=620|p3=Historical Right (Italy)
}}
Test title
{{Parliament diagram
|float=left
|width=100
|n1=60|p1=Historical Far Left|c1=#A61022
|n2=620|p2=Historical Left (Italy)|c2=#0000FF
|n3=620|p3=Historical Right (Italy)|c3=#000000
}}
{{Parliament diagram
|background=#eee
|n1=60|p1=Historical Far Left
|n2=620|p2=Historical Left (Italy)
|n3=620|p3=Historical Right (Italy)
}}