Chartjs-Chart.js How to make more space between doughnut inside doughnut?

0👍

This solution is not working anymore:

Chart.js v2: space between doughnut inside doughnut

but i found another one that works just adding empty data between

Padding Between Pie Charts in chart js

const colors = ["#FF6384", "#36A2EB", "#FFCE56"];
var pieChart = new Chart("myChart", {
   type: 'pie',
   data: {
     labels: ["Red", "Blue", "Yellow"],
     datasets: [{      
        data: [8, 5, 6],
      backgroundColor: colors,
  },{ 
  weight: 0.2
  },{ 
  data: [5, 7, 4],
  backgroundColor: colors,
  weight: 1.2
}]}})

Leave a comment