Search code examples
chart.jspie-chart

Remove chartjs pie chart highlight on hover


enter image description here

Above when I hover over the chart it highlights the section Im hovering over with a grey border. What can I do to remove this.


Solution

  • You can use the hoverBorderWidth property to remove the border on hover like this:

    var myDoughnutChart = new Chart(ctx, {
        type: 'doughnut',
        data: {
          datasets: [
            data: [//data here],
            hoverBorderWidth: 0
          ]
        },
        options: options
    });