forked from adamlaska/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeeting_stats_country.html
More file actions
98 lines (90 loc) · 2.13 KB
/
meeting_stats_country.html
File metadata and controls
98 lines (90 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
{% load origin %}{% origin %}
<div id="chart"></div>
<script>
var chartConf = {
chart: {
type: 'column'
},
plotOptions: {
column: {
animation: false
}
},
title: {
text: '{{ stats_title|escapejs }}'
},
xAxis: {
type: "category",
title: {
text: 'Country'
}
},
yAxis: {
title: {
text: 'Number of attendees'
}
},
tooltip: {
formatter: function () {
var s = '<b>' + this.points[0].key + '</b>';
$.each(this.points, function () {
s += '<br/>' + chartConf.yAxis.title.text + ': ' + this.y;
});
return s;
},
shared: true
},
series: {{ chart_data }}
};
</script>
<div id="pie-chart"></div>
<script>
var pieChartConf = {
chart: {
type: 'pie'
},
plotOptions: {
pie: {
animation: false,
dataLabels: {
enabled: true,
format: "{point.name}: {point.percentage:.1f}%"
},
enableMouseTracking: false
}
},
title: {
text: "Countries at IETF {{ meeting.number }}"
},
tooltip: {
},
series: [ {
name: "Countries",
colorByPoint: true,
data: {{ piechart_data }}
}]
};
</script>
<h3>Data</h3>
<table class="table table-condensed stats-data tablesorter">
<thead>
<tr>
<th>Country</th>
<th>Percentage of attendees</th>
<th>Attendees</th>
</tr>
</thead>
<tbody>
{% for country, percentage, count, names in table_data %}
<tr>
<td>{{ country|default:"(unknown)" }}</td>
<td>{{ percentage|floatformat:2 }}%</td>
<td>{% include "stats/includes/number_with_details_cell.html" %}</td>
</tr>
{% endfor %}
</tbody>
</table>
<p>EU (European Union) is not a country, but has been added for reference, as the sum of
all current EU member countries:
{% for c in eu_countries %}{{ c.name }}{% if not forloop.last %}, {% endif %}{% endfor %}.
</p>