1

Is there any way to make some more space between doughnut chart inside of doughnut chart? Currently it looks like this: enter image description here

And I want it to look like this: (more space between doughnuts) enter image description here

  • No option exists natively in chart.js: there was a solution extending doughnut controller (https://stackoverflow.com/questions/43202276/chart-js-v2-space-between-doughnut-inside-doughnut) but it's not working with current chart.js version (2.7.1) – beaver Feb 05 '18 at 12:20
  • yes i have seen this solution but sadly it doesn't work anymore –  Feb 05 '18 at 13:41
  • You can try to update that extension to current version – beaver Feb 05 '18 at 13:42
  • @ChrisK. did you find solution for this? – Vikasdeep Singh Oct 17 '18 at 05:04

1 Answers1

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
}]}})
Nikola Lukic
  • 4,001
  • 6
  • 44
  • 75