Chartjs-Update RectChart JS Options on Button Click

0👍

function handleValueChkChange() {
    chart.options.plugins.datalabels.display= false;
    Chart.update();
  }

In your code, chart.option is camelCase And your Chart object is PascalCase?

You can define options as react state, and update state on demand after that call update method.


I implemented a example code for your problem and its will be work:
Sample Code

Leave a comment