52 lines
1.1 KiB
HTML
52 lines
1.1 KiB
HTML
{% load origin %}
|
|
{% origin %}
|
|
<div id="chart"></div>
|
|
<script>
|
|
var chartConf = {
|
|
chart: {
|
|
type: 'line',
|
|
},
|
|
plotOptions: {
|
|
line: {
|
|
marker: {
|
|
enabled: false
|
|
},
|
|
animation: false
|
|
}
|
|
},
|
|
legend: {
|
|
align: "right",
|
|
verticalAlign: "middle",
|
|
layout: "vertical",
|
|
enabled: true
|
|
},
|
|
title: {
|
|
text: '{{ stats_title|escapejs }}'
|
|
},
|
|
xAxis: {
|
|
tickInterval: 1,
|
|
title: {
|
|
text: 'Year'
|
|
}
|
|
},
|
|
yAxis: {
|
|
min: 0,
|
|
title: {
|
|
text: 'Authors active in year'
|
|
}
|
|
},
|
|
tooltip: {
|
|
formatter: function () {
|
|
var s = '<b>' + this.x + '</b>';
|
|
|
|
$.each(this.points, function () {
|
|
s += '<br>' + this.series.name + ': ' + this.y;
|
|
});
|
|
|
|
return s;
|
|
},
|
|
shared: true
|
|
},
|
|
series: {{ chart_data }}
|
|
};
|
|
</script> |