![]() | This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||
|
|
||
This page has archives. Sections older than 180 days may be automatically archived by Lowercase sigmabot III when more than 4 sections are present. |
I'm trying to make an election chart but I'm running into an issue, and I'm not sure if it's my formatting or the template:
The following is the formatting I'm using
{{Election results
|alliance1=1st Party|seats1=148
|alliance2=Alliance|aspan2=3|party2=Alliance - 2nd Party|seats2=69
|party3=Alliance - 3rd Party|seats3=26
|aseats4=97
|party5=4th party|seats5=53
}}
the intent is that the 2nd and 3rd party are both present in the alliance, with the total of that alliance listed too (hense |aseats4=97), but it seems like it won't come up on the actual template and instead produces this issue:
Party or alliance | Seats | |||
---|---|---|---|---|
1st Party | 148 | |||
Alliance | Alliance - 2nd Party | 69 | ||
Alliance - 3rd Party | 26 | |||
4th party | 53 | |||
Total | 296 |
If this is an issue with my formatting, I'd love to know what I've done wrong. If it's an issue with the template, I'd appriciate it if the template could be altered to not produce this issue Bejakyo (talk) 23:56, 12 March 2025 (UTC)
Party or alliance | Seats | |||
---|---|---|---|---|
1st Party | 148 | |||
Alliance | Alliance - 2nd Party | 69 | ||
Alliance - 3rd Party | 26 | |||
Total | 97 | |||
4th party | 53 | |||
Total | 296 |
I went through and worked out how to get rowscopes into the top-half rows (per WP:DTAB). The bottom rows already had them (probably since there's not as much logic around them). It's a gnarly little template but I think I got it all sorted with the extensive testcases. There is one case that's still missing that I don't know enough lua to figure out: if you have alliances+parties (no candidates), but not all parties are in alliances (such as Template:Election results/testcases#Alliance totals), then the alliances have rowscopes but the un-allied parties don't. It's basically because the determination to put a rowscope on a 'party' cell is if there's no candidate (or it's dsv) and has_alliance is false (because if it was true then the alliance should have the scope), but for 'mixed' groupings I couldn't see how to determine in the lua code that that party isn't in an alliance. It's really not a big deal, but if anyone can see the solution easily, please do. --PresN 03:11, 13 April 2025 (UTC)
I'm currently drafting a big revamp of 2002 Dutch general election. You can see my current progress here.
One thing I've noticed is that, while template:election results is more compact and sortable than a wikitable, it is inferior when it's used to supplant prose sections because it does not allow text to embed besides it. You can see this in my draft when comapring the section "Incumbent coalition wins re-election (1998)" to "Municipal elections and debate (6 March 2002)". I would appreciate if someone with more technical know-how than me would add embed parameters to this template. Koopinator (talk) 12:16, 23 April 2025 (UTC)
Is there any reason why the format for addition or subtraction uses an en dash (–) rather than a minus sign (−) in the template? Wikipedia discourages using anything other than a minus sign (see MOS:FORMULA), so is this an intentional exception, or a mistake that needs to be rectified? MrSwedishMeatballs (talk) 19:00, 28 April 2025 (UTC)