46 lines
1.1 KiB
JavaScript
46 lines
1.1 KiB
JavaScript
document.myChart;
|
|
function ladeStatistik() {
|
|
$.ajax({
|
|
url: "../index.php",
|
|
type: "GET",
|
|
data: {
|
|
application: "loadstatistik",
|
|
event_id: $("#spieltagselect").val()
|
|
},
|
|
dataType: "json"
|
|
}).done(function(response) {
|
|
myChart.data = response;
|
|
myChart.update();
|
|
});
|
|
}
|
|
|
|
$(document).ready(function() {
|
|
const ctx = document.getElementById("dotterStatistikErgebnisse");
|
|
myChart = new Chart(ctx, {
|
|
type: "line",
|
|
data: [],
|
|
options: {
|
|
animations: {
|
|
tension: {
|
|
duration: 2000,
|
|
easing: "linear",
|
|
from: 0.5,
|
|
to: 0,
|
|
loop: true
|
|
}
|
|
},
|
|
responsive: true,
|
|
plugins: {
|
|
legend: {
|
|
position: "top"
|
|
},
|
|
title: {
|
|
display: false,
|
|
text: "FC Dotterbühel"
|
|
}
|
|
}
|
|
}
|
|
});
|
|
ladeStatistik();
|
|
});
|