miany w tooltipie

This commit is contained in:
Mateusz Gruszczyński
2025-07-31 22:17:04 +02:00
parent bdee9cd3aa
commit b46cc7d295

View File

@@ -39,7 +39,17 @@ document.addEventListener("DOMContentLoaded", function () {
options: {
responsive: true,
plugins: {
tooltip: { mode: 'index', intersect: false },
tooltip: {
mode: 'index',
intersect: false,
callbacks: {
label: function(context) {
const value = context.raw;
if (!value) return null;
return `${context.dataset.label}: ${value}`;
}
}
},
legend: {
position: 'top',
labels: {