[Chartjs]-ChartJS Doughnout Chart Pie Offset on Hover

2👍

Add this code in update function of doughnut

var innerRadius = reset && animationOpts.animateScale ? 0 : me.innerRadius;
if (index == doughnutIndex) {
   innerRadius = innerRadius + 10;
}

And add a new function setHoverStyle

    setHoverStyle: function(arc) {
        doughnutIndex = arc._index;
        this.update();
    },

1👍

If what you are wanting is for the section to move outward on hover, that is done with simply setting hoverOffset with a number. See this example and documentation here.

Leave a comment