Files
dotter_t3/packages/watten/Resources/Public/Javascript/statistik_line.js
T
2026-10-18 17:49:22 +02:00

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();
});