charts, legend bottom

This commit is contained in:
Mateusz Gruszczyński
2025-07-31 23:14:29 +02:00
parent c28e6f394d
commit 085743c7fb

View File

@@ -50,7 +50,7 @@ document.addEventListener("DOMContentLoaded", function () {
}
}
},
legend: { position: 'bottom' }
legend: { position: 'top' }
},
scales: {
x: { stacked: true },
@@ -74,6 +74,20 @@ document.addEventListener("DOMContentLoaded", function () {
options: {
responsive: true,
scales: { y: { beginAtZero: true } }
plugins: {
tooltip: {
mode: 'index',
intersect: false,
callbacks: {
label: function (context) {
const value = context.raw;
if (!value) return null;
return `${context.dataset.label}: ${value}`;
}
}
},
legend: { position: 'bottom' }
},
}
});
}