[Chartjs]-Point unselection in ChartJS

2👍

You should get an instance of dxPieChart and call a method of this instance like this:

$(".chart").dxPieChart('instance').clearSelection();

You can call this on some event such as button click.

On the other hand, if your goal is to de-select pie segment when user clicks this segment (which means toggle selection), you could change your click handler:

pointClick: function (point) {
    (point.fullState & 2) ? point.clearSelection() : point.select();
}

I created this code based on javascript from this chart demo

Leave a comment