only show platforms with counts > 0

This commit is contained in:
Tobias Diekershoff 2016-01-04 09:54:12 +01:00
parent 8e7d53cd41
commit 5099f43c42

View file

@ -9,7 +9,9 @@
<p>{{$legendtext}} <p>{{$legendtext}}
<ul> <ul>
{{foreach $counts as $c}} {{foreach $counts as $c}}
{{if $c[0]['count(*)'] > 0}}
<li>{{$c[0]['platform']}} ({{$c[0]['count(*)']}})</li> <li>{{$c[0]['platform']}} ({{$c[0]['count(*)']}})</li>
{{/if}}
{{/foreach}} {{/foreach}}
</ul> </ul>
</p> </p>
@ -30,6 +32,7 @@ document.getElementById('FederationLegend').innerHTML = myDoughnutChart.generate
<table style="width: 100%"> <table style="width: 100%">
{{foreach $counts as $c}} {{foreach $counts as $c}}
{{if $c[0]['count(*)'] > 0}}
<tr> <tr>
<th>{{$c[0]['platform']}}</th> <th>{{$c[0]['platform']}}</th>
<th><strong>{{$c[0]['count(*)']}}</strong></td> <th><strong>{{$c[0]['count(*)']}}</strong></td>
@ -56,5 +59,6 @@ var my{{$c[2]}}DoughnutChart = new Chart(ctx).Doughnut({{$c[2]}}data,
</ul> </ul>
</td> </td>
</tr> </tr>
{{/if}}
{{/foreach}} {{/foreach}}
</table> </table>