89 lines
1.6 KiB
HTML
89 lines
1.6 KiB
HTML
{% extends 'base.html' %}
|
|
|
|
{% load image_tags %}
|
|
|
|
{% block main_container %}
|
|
|
|
<script type="text/javascript" src="{{ STATIC_URL }}js/highcharts.js"></script>
|
|
<script type="text/javascript" src="{{ STATIC_URL }}js/modules/exporting.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
var barChart;
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('.menu li').removeClass('active');
|
|
$('#navlink_charts').parent().addClass('active');
|
|
|
|
|
|
Highcharts.setOptions({
|
|
colors: ['#058DC7', '#50B432', '#ED561B', '#DDDF00', '#24CBE5', '#64E572', '#FF9655', '#FFF263', '#6AF9C4']
|
|
});
|
|
|
|
barchart = new Highcharts.Chart({
|
|
chart: {
|
|
renderTo: 'barcontainer',
|
|
type: 'bar'
|
|
},
|
|
title: {
|
|
text: ''
|
|
},
|
|
xAxis: {
|
|
categories: [{{c_string|safe}}],
|
|
title: {
|
|
text: null
|
|
}
|
|
},
|
|
yAxis: {
|
|
min: 0,
|
|
title: {
|
|
text: 'Nombre de cartes (unités)',
|
|
align: 'high'
|
|
},
|
|
labels: {
|
|
overflow: 'justify'
|
|
}
|
|
},
|
|
plotOptions: {
|
|
bar: {
|
|
dataLabels: {
|
|
enabled: false
|
|
}
|
|
}
|
|
},
|
|
legend: {
|
|
layout: 'vertical',
|
|
align: 'right',
|
|
verticalAlign: 'top',
|
|
x: -100,
|
|
y: 100,
|
|
floating: true,
|
|
borderWidth: 1,
|
|
backgroundColor: '#FFFFFF',
|
|
shadow: true
|
|
},
|
|
credits: {
|
|
enabled: false
|
|
},
|
|
series: [{
|
|
name: 'Nombre de cartes',
|
|
data: [
|
|
{% for country in countries %}
|
|
{{country.num_cards}},
|
|
{% endfor %}
|
|
]
|
|
}]
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
|
|
<h2></h2>
|
|
|
|
<div id="barcontainer" style="min-width: 400px; height: 85%; margin: 0 auto">
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|