2017-04-02 19:04:14 +00:00
|
|
|
<?php include '__header.phtml'; ?>
|
2017-04-03 16:21:36 +00:00
|
|
|
<a class="btn btn-default pull-left" href="rekeningen/<?= $rekeningnr ?>" role="button">Terug</a>
|
|
|
|
<canvas id="grafiek" height="100"></canvas>
|
2017-04-03 16:17:26 +00:00
|
|
|
<?php
|
|
|
|
if (!$statistieken) {
|
|
|
|
?>
|
|
|
|
|
|
|
|
<div class="alert alert-danger" role="alert"><b>Fout!</b> Dit is niet een aan jouw account gekoppelde rekening.</div>
|
|
|
|
<?php
|
|
|
|
|
|
|
|
} else {
|
|
|
|
?>
|
|
|
|
|
2017-04-02 20:28:14 +00:00
|
|
|
<a class="btn btn-default pull-left" href="rekeningen/<?= $rekeningnr?>" role="button">Terug</a>
|
2017-04-02 19:04:14 +00:00
|
|
|
<canvas id="myChart" height="100"></canvas>
|
|
|
|
<script>
|
|
|
|
Chart.defaults.global.legend.display = false;//Geen legenda
|
2017-04-03 16:21:36 +00:00
|
|
|
var grafiek = document.getElementById("grafiek");
|
|
|
|
var myChart = new Chart(grafiek, {
|
2017-04-02 19:04:14 +00:00
|
|
|
type: "line",
|
|
|
|
options: {
|
|
|
|
title: {
|
|
|
|
display: true,
|
|
|
|
text: "Saldo van de afgelopen maand"
|
2017-04-03 16:21:36 +00:00
|
|
|
},
|
|
|
|
scales: {
|
|
|
|
xAxes: [{
|
|
|
|
type: "time",
|
|
|
|
unit: "day",
|
|
|
|
time: {
|
|
|
|
displayFormats: {
|
|
|
|
"day": "D MMM"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
yAxes: [{
|
|
|
|
ticks: {
|
|
|
|
beginAtZero:true
|
|
|
|
}
|
|
|
|
}]
|
2017-04-02 19:04:14 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
data: {
|
2017-04-03 16:21:36 +00:00
|
|
|
//Laad de dagen in
|
2017-04-02 19:04:14 +00:00
|
|
|
labels: <?php echo json_encode($statistieken['x-as']); ?>,
|
|
|
|
datasets: [{
|
|
|
|
label: "Saldo",
|
2017-04-03 16:21:36 +00:00
|
|
|
//Laad de saldo's in
|
2017-04-02 19:04:14 +00:00
|
|
|
data: <?php echo json_encode($statistieken['y-as']); ?>,
|
|
|
|
borderWidth: 2,
|
2017-04-03 16:21:36 +00:00
|
|
|
lineTension: 0, //Rechte lijnen
|
2017-04-02 19:04:14 +00:00
|
|
|
fill: false,
|
|
|
|
borderColor: "black",
|
|
|
|
pointRadius: 5,
|
|
|
|
pointBorderColor: "rgba(0, 0, 0, 0)", //Onzichtbare punten
|
|
|
|
pointBackgroundColor: "rgba(0, 0, 0, 0)",
|
|
|
|
pointHoverRadius: 5,
|
|
|
|
pointHoverBackgroundColor: "black"
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
});
|
2017-04-03 16:17:26 +00:00
|
|
|
|
|
|
|
<?php
|
|
|
|
} ?>
|
2017-04-02 19:04:14 +00:00
|
|
|
</script>
|
|
|
|
<?php include '__footer.phtml'; ?>
|