1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

51 lines
1.5 KiB
PHTML

<?php include '__header.phtml'; ?>
<?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 {
?>
<a class="btn btn-default pull-left" href="rekeningen/<?= $rekeningnr?>" role="button">Terug</a>
<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"
}]
}
});
<?php
} ?>
</script>
<?php include '__footer.phtml'; ?>