charts, legend bottom
This commit is contained in:
@@ -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' }
|
||||
},
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user