1👍
I finally managed to solve it. It seems "chart.defaults.plugins.legend.onClick" its outdated. What "onClick" func really does is this:
legend.chart.toggleDataVisibility(legendItem.index);
legend.chart.update();
So I copy this lines and pasted inside options.plugins.legend.onClick
- Chartjs-Is there any way to change the font size of labels in bar chart in Chart.js v3?
- Chartjs-How to keep rounded bar corners when data is filtered chartJs?
Source:stackexchange.com