Statistieken
This commit is contained in:
35
templates/statistieken.phtml
Normal file
35
templates/statistieken.phtml
Normal file
@ -0,0 +1,35 @@
|
||||
<?php include '__header.phtml'; ?>
|
||||
<canvas id="myChart" height="100"></canvas>
|
||||
<script>
|
||||
function newDate(days) {
|
||||
return moment().add(days, 'd');
|
||||
}
|
||||
Chart.defaults.global.legend.display = false;//Geen legenda
|
||||
var ctx = document.getElementById("myChart");
|
||||
var myChart = new Chart(ctx, {
|
||||
type: "line",
|
||||
options: {
|
||||
title: {
|
||||
display: true,
|
||||
text: "Saldo van de afgelopen maand"
|
||||
}
|
||||
},
|
||||
data: {
|
||||
labels: <?php echo json_encode($statistieken['x-as']); ?>,
|
||||
datasets: [{
|
||||
label: "Saldo",
|
||||
data: <?php echo json_encode($statistieken['y-as']); ?>,
|
||||
borderWidth: 2,
|
||||
lineTension: 0,
|
||||
fill: false,
|
||||
borderColor: "black",
|
||||
pointRadius: 5,
|
||||
pointBorderColor: "rgba(0, 0, 0, 0)", //Onzichtbare punten
|
||||
pointBackgroundColor: "rgba(0, 0, 0, 0)",
|
||||
pointHoverRadius: 5,
|
||||
pointHoverBackgroundColor: "black"
|
||||
}]
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<?php include '__footer.phtml'; ?>
|
Reference in New Issue
Block a user