0

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(){}

    },
t20e
  • 13
  • 6

1 Answers1

0

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

LeeLenalee
  • 27,463
  • 6
  • 45
  • 69