fix w js
This commit is contained in:
1 parent
c3c865f074
commit
bdee9cd3aa
1 file changed
+1
@@ -44,6 +44,7 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
position: 'top',
|
||||
labels: {
|
||||
filter: function(legendItem, chart) {
|
||||
if (!chart.data || !Array.isArray(chart.data.datasets)) return false;
|
||||
const dataset = chart.data.datasets[legendItem.datasetIndex];
|
||||
if (!dataset || !Array.isArray(dataset.data)) return false;
|
||||
return dataset.data.some(val => !!val);
|
||||
|
||||
Reference in new issue
Block a user