Template:MultiPartyBar: Difference between revisions

From MicrasWiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 15: Line 15:
{{!)}}|}}{{#if:{{{hidenames|}}}||
{{!)}}|}}{{#if:{{{hidenames|}}}||
{{(!}} style="width:{{{width|500}}}px; border-collapse:collapse;" cellpadding=0
{{(!}} style="width:{{{width|500}}}px; border-collapse:collapse;" cellpadding=0
| style="height: 2px;"|
{{!}} style="height: 2px;"{{!}}
|-
{{!}}-
{{!}}bgcolor={{{P1col|#ff3a3a}}} width=5px{{!}} {{!!}}style="width:{{#ifeq:{{{P1seats}}}|0|1|{{#expr:({{{width|500}}}*{{{P1seats|35}}}/{{{Totseats|100}}})-5}}}}px;"| '''{{{P1name}}}'''
{{!}}bgcolor={{{P1col|#ff3a3a}}} width=5px{{!}} {{!!}}style="width:{{#ifeq:{{{P1seats}}}|0|1|{{#expr:({{{width|500}}}*{{{P1seats|35}}}/{{{Totseats|100}}})-5}}}}px;"{{!}} '''{{{P1name}}}'''
{{!}}bgcolor={{{P2col|#0a6aa6}}} width=5px{{!}} {{!!}}style="width:{{#ifeq:{{{P2seats}}}|0|1|{{#expr:({{{width|500}}}*{{{P2seats|30}}}/{{{Totseats|100}}})-5}}}}px;"| '''{{{P2name}}}'''
{{!}}bgcolor={{{P2col|#0a6aa6}}} width=5px{{!}} {{!!}}style="width:{{#ifeq:{{{P2seats}}}|0|1|{{#expr:({{{width|500}}}*{{{P2seats|30}}}/{{{Totseats|100}}})-5}}}}px;"{{!}} '''{{{P2name}}}'''
{{!}}bgcolor={{{P3col|#ffd966}}} width=5px{{!}} {{!!}}style="width:{{#ifeq:{{{P3seats}}}|0|1|{{#expr:({{{width|500}}}*{{{P3seats|25}}}/{{{Totseats|100}}})-5}}}}px;"|&nbsp;'''{{{P3name}}}'''{{#if:{{{P4name|}}}|<br>
{{!}}bgcolor={{{P3col|#ffd966}}} width=5px{{!}} {{!!}}style="width:{{#ifeq:{{{P3seats}}}|0|1|{{#expr:({{{width|500}}}*{{{P3seats|25}}}/{{{Totseats|100}}})-5}}}}px;"{{!}}&nbsp;'''{{{P3name}}}'''{{#if:{{{P4name|}}}|<br>
{{!}}bgcolor={{{P4col}}} width=5px{{!}} {{!!}}style="width:{{#ifeq:{{{P4seats}}}|0|1|{{#expr:({{{width|500}}}*{{{P4seats}}}/{{{Totseats|100}}})-5}}}}px;"{{!}}&nbsp;'''{{{P4name}}}'''|}}{{#if:{{{P5name|}}}|<br>
{{!}}bgcolor={{{P4col}}} width=5px{{!}} {{!!}}style="width:{{#ifeq:{{{P4seats}}}|0|1|{{#expr:({{{width|500}}}*{{{P4seats}}}/{{{Totseats|100}}})-5}}}}px;"{{!}}&nbsp;'''{{{P4name}}}'''|}}{{#if:{{{P5name|}}}|<br>
{{!}}bgcolor={{{P5col}}} width=5px{{!}} {{!!}}style="width:{{#ifeq:{{{P5seats}}}|0|1|{{#expr:({{{width|500}}}*{{{P5seats}}}/{{{Totseats|100}}})-5}}}}px;"{{!}}&nbsp;'''{{{P5name}}}'''|}}
{{!}}bgcolor={{{P5col}}} width=5px{{!}} {{!!}}style="width:{{#ifeq:{{{P5seats}}}|0|1|{{#expr:({{{width|500}}}*{{{P5seats}}}/{{{Totseats|100}}})-5}}}}px;"{{!}}&nbsp;'''{{{P5name}}}'''|}}
| style="width:{{#expr:{{{width|500}}}*({{{Totseats|100}}}-{{{P1seats|35}}}-{{{P2seats|30}}}-{{{P3seats|25}}}-{{#if:{{{P4seats|}}}|{{{P4seats}}}|}}-{{#if:{{{P5seats|}}}|{{{P5seats}}}|}}}}px;"{{!}}
{{!}} style="width:{{#expr:{{{width|500}}}*({{{Totseats|100}}}-{{{P1seats|35}}}-{{{P2seats|30}}}-{{{P3seats|25}}}-{{#if:{{{P4seats|}}}|{{{P4seats}}}|}}-{{#if:{{{P5seats|}}}|{{{P5seats}}}|}}}}px;"{{!}}
|}
|}
}}<noinclude>
}}<noinclude>


[[Category: Politics templates]]</noinclude>
[[Category: Politics templates]]</noinclude>

Revision as of 20:20, 8 November 2020

 35   30   25 
 {{{P1name}}}  {{{P2name}}}  {{{P3name}}}