datatracker/ietf/templates/stats/document_stats_authors.html
Ole Laursen a9525ab4f4 Revamp stats selector UI a bit to accomodate statistics counting
authors (instead of documents), add stats with documents per author
 - Legacy-Id: 12766
2017-01-31 16:32:20 +00:00

65 lines
1.4 KiB
HTML

<h3>{{ stats_title }}</h3>
<div id="chart"></div>
<script>
var chartConf = {
chart: {
type: 'column'
},
title: {
text: '{{ stats_title|escapejs }}'
},
xAxis: {
tickInterval: 1,
title: {
text: 'Number of authors'
}
},
yAxis: {
title: {
text: 'Percentage of {{ doc_label }}s'
},
labels: {
formatter: function () {
return this.value + '%';
}
}
},
tooltip: {
formatter: function () {
var s = '<b>' + this.x + ' ' + (this.x == 1 ? "author" : 'authors') + '</b>';
$.each(this.points, function () {
s += '<br/>' + chartConf.yAxis.title.text + ': ' + this.y.toFixed(1) + '%';
});
return s;
},
shared: true
},
series: {{ chart_data }}
};
</script>
<h3>Data</h3>
<table class="table table-condensed stats-data">
<thead>
<tr>
<th>Authors</th>
<th>Percentage of {{ doc_label }}s</th>
<th>{{ doc_label|capfirst }}s</th>
</tr>
</thead>
<tbody>
{% for author_count, percentage, names in table_data %}
<tr>
<td>{{ author_count }}</td>
<td>{{ percentage|floatformat:2 }}%</td>
<td>{% include "stats/includes/number_with_details_cell.html" %}</td>
</tr>
{% endfor %}
</tbody>
</table>