Fix line_chart.js

This commit is contained in:
Pek5892 2024-05-17 16:49:14 +02:00
parent 123582b730
commit 90d9a80f4f
1 changed files with 5 additions and 5 deletions

View File

@ -44,8 +44,8 @@ class LineChart extends Stat {
labels.push(date.format("MMMM YYYY"));
});
while (chart.data.badges.length < data.results.length) {
chart.data.badges.push("");
while (chart.data.labels.length < data.results.length) {
chart.data.labels.push("");
}
chart.data.datasets.push({
@ -100,11 +100,11 @@ class LineChart extends Stat {
color = color.substr(0, 7);
chart.data.datasets.splice(dataset_index, 1);
chart.data.badges.splice(dataset_index, 1);
chart.data.labels.splice(dataset_index, 1);
}
while (chart.data.badges.length > max_length) {
chart.data.badges.pop("");
while (chart.data.labels.length > max_length) {
chart.data.labels.pop("");
}
chart.update();