'chartJS, how to disable user from clicking on legend names and changing the graph?
This is a react project. I'm running the latest version of all software. I am trying to create a pie chart but when the legend names are clicked, it changes the graph. So far I've tried each of the lines in the legend below.
legend: {
onClick: (e) => e.stopPropagation()
display: false
onclick(){}
},
Solution 1:[1]
you are configuring it in the wrong place, you put it in options.legend while the legend options needs to be configured in the options.plugins.legend namespace
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | LeeLenalee |
