Chartjs-Chartjs: How to programatically remove (unhighlight or make inactive) all the active points on chart

0๐Ÿ‘

โœ…

As show in the code snippet below, I used update method of the chart to rerender the chart after I set empty array for the active property of the chart.

JS:

var myChart = new Chart(ctx, {
  ....
  .....
});

function setInactiveAllPoints() {
  myChart.active = [];
  myChart.update();
}

HTML:

<button onclick="setInactiveAllPoints()">Set Inactive All Points On Chart</button>

Leave a comment