|
@@ -35,19 +35,19 @@
|
|
<div class="span8">
|
|
<div class="span8">
|
|
<h2 class='page-header'>Résultats</h2>
|
|
<h2 class='page-header'>Résultats</h2>
|
|
<svg class="results cardinal-{{ vote.id_cardinal }}"
|
|
<svg class="results cardinal-{{ vote.id_cardinal }}"
|
|
- width="{{ 150 + (100 * 5) + 50 + 100 + 100 }}"
|
|
|
|
|
|
+ width="{{ 150 + (100 * 5) + 100 + 100 }}"
|
|
height="{{25 + results.list|length * 20 + 40}}">
|
|
height="{{25 + results.list|length * 20 + 40}}">
|
|
<g class="choice" transform="translate(100,0)">
|
|
<g class="choice" transform="translate(100,0)">
|
|
<text class="choice-legend" x="-10" y="9.5" dy=".35em">Légende :</text>
|
|
<text class="choice-legend" x="-10" y="9.5" dy=".35em">Légende :</text>
|
|
|
|
+ {% for value in values %}
|
|
|
|
+ <g transform="translate({{ (loop.index0 * 750 / loop.length) }},0)">
|
|
|
|
+ <rect width="{{ 750 / loop.length + 1 }}" height="18"></rect>
|
|
|
|
+ <rect class="{{ value.class }}" x="1" y ="0" width="{{ 750 / loop.length - 1}}" height="18"></rect>
|
|
|
|
+ <text class="choice-legend-item" text-anchor="start" x="{{ 750 / loop.length - 2 }}" y="9.5" dy=".35em"
|
|
|
|
+ >{{ value.name }}</text>
|
|
|
|
+ </g>
|
|
|
|
+ {% endfor %}
|
|
</g>
|
|
</g>
|
|
- {% for value in values %}
|
|
|
|
- <g transform="translate({{ 150 + (loop.index0 * 640 / loop.length) }},0)">
|
|
|
|
- <rect width="{{ 640 / loop.length + 1 }}" height="18"></rect>
|
|
|
|
- <rect class="{{ value.class }}" x="1" y ="0" width="{{ 640 / loop.length - 1}}" height="18"></rect>
|
|
|
|
- <text class="choice-legend-item" text-anchor="start" x="{{ 640 / loop.length - 2 }}" y="9.5" dy=".35em"
|
|
|
|
- >{{ value.name }}</text>
|
|
|
|
- </g>
|
|
|
|
- {% endfor %}
|
|
|
|
<g transform="translate({{150 + (100 * 5) + 35}},20)">
|
|
<g transform="translate({{150 + (100 * 5) + 35}},20)">
|
|
<text class="choice-sum-legend" x="20" y="9.5" dy=".35em">somme↓</text>
|
|
<text class="choice-sum-legend" x="20" y="9.5" dy=".35em">somme↓</text>
|
|
</g>
|
|
</g>
|