Search code examples
highchartsdonut-chart

Nested Donut chart with margins


I am working on creating a nested donut chart with highcharts. I saw the below link : can we make nested donut charts in highcharts?

is there a way we can add some space/margins around each donut.


Solution

  • Following the linked example, you could do something like that:

      series: [{
        type: 'pie',
        name: 'Election',
        size: '60%', // Change this parameter
        innerSize: '50%', // Change this parameter
        data: [
          {name: "A", y: 20},
          {name: "B", y: 10},
          {name: "C", y: 15}
        ]
      }, {
        type: 'pie',
        name: 'Proprietary or Undetectable',
        innerSize: '80%', // Change this parameter
        data: [
          {name: "A", y: 10},
          {name: "B", y: 15},
          {name: "C", y: 20}
        ]
      }]
    

    Fiddle