54 lines
1.4 KiB
XML
54 lines
1.4 KiB
XML
<metal:block use-macro="main_template">
|
|
<div metal:fill-slot="content">
|
|
|
|
<div class="row">
|
|
<form method="POST" id="frm" class="form-horizontal">
|
|
<div class="form-group">
|
|
<label class="control-label col-md-2">Groupe</label>
|
|
<div class="col-md-10">
|
|
<select class="form-control" id="groupe" name="groupe" onChange="$('#frm').submit()">
|
|
<tal:block tal:repeat="item groupes">
|
|
<option value="${item.group2}" tal:attributes="selected groupe==item.group2 and 'selected' or None"> ${item.group2}</option>
|
|
</tal:block>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<!-- graphique colonne année N -->
|
|
<div id="barChart_annee" style="width: 100%; height: 500px;"></div>
|
|
</div>
|
|
|
|
|
|
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
|
|
<script type="text/javascript">
|
|
google.charts.load("current", {packages:["corechart", 'bar']});
|
|
google.charts.setOnLoadCallback(drawChart);
|
|
var dataSet_annee = ${barChart_annee};
|
|
|
|
function drawChart() {
|
|
var data_annee = google.visualization.arrayToDataTable(dataSet_annee);
|
|
|
|
var options_annee = {
|
|
title: '${title}',
|
|
seriesType: 'bars',
|
|
series: {1: {type: 'line'}},
|
|
vAxis: {
|
|
viewWindow: {
|
|
min:0
|
|
}
|
|
}
|
|
};
|
|
|
|
var chart_annee = new google.visualization.ComboChart(document.getElementById('barChart_annee'));
|
|
chart_annee.draw(data_annee, options_annee);
|
|
}
|
|
</script>
|
|
|
|
</div><!-- content -->
|
|
</metal:block>
|
|
|
|
|