stat cadoles

This commit is contained in:
2020-10-14 16:08:53 +02:00
parent 702d471c1a
commit 4e407397f2
2 changed files with 67 additions and 0 deletions

View File

@@ -7,6 +7,17 @@ STATISTIQUES
</h1>
<div class="row">
<div class="col-md-12">
<div class="card homecard" style="width: 100%; height: 600px;">
<div class="card-header">
CADOLES
</div>
<div class="card-body">
<div id="chart-c" style="height: 250px;"></div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="card homecard" style="width: 100%; height: 600px;">
<div class="card-header">
@@ -35,10 +46,45 @@ STATISTIQUES
{% block localjavascript %}
$(document).ready(function() {
graphCadoles();
graphDEV();
graphCSS();
});
function graphCadoles() {
new Morris.Line({
element: 'chart-c',
xkey: 'month',
ymax: 350,
ykeys: [
'Total',
{% for nature in tbnatures %}
'{{ nature.name }}',
{% endfor %}
],
data: [
{% for month in tbmonths %}
{ month: '{{ month.name }}',
{% for nature in month.natures %}
{% if loop.first %}
'Total': {{ nature.totalmonth }},
{% endif %}
'{{ nature.name }}': {{ nature.totalnature }},
{% endfor %}
},
{% endfor %}
],
labels: [
'Total',
{% for nature in tbnatures %}
'{{ nature.name }}',
{% endfor %}
]
});
}
function graphDEV() {