javascriptjqueryhighchartsdotnethighcharts

can we make nested donut charts in highcharts?


I am using highchart library .can we make nested dount chart in hightcharts ? I am able to make donut chart .I want to make nested the same thing inside the donut chart . In other words I make donut chart can I make same thing inside the donut chart

here is my code

http://jsfiddle.net/oupmgvjy/2/

I am taking help from this http://www.highcharts.com/demo

$(function () {
    Highcharts.chart('container', {
        chart: {
            plotBackgroundColor: null,
            plotBorderWidth: 0,
            plotShadow: false
        },
        title: {
            text: 'Browser<br>shares<br>2015',
            align: 'center',
            verticalAlign: 'middle',
            y: 40
        },
        tooltip: {
            pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
        },
        plotOptions: {
            pie: {
                dataLabels: {
                    enabled: true,
                    distance: -50,
                    style: {
                        fontWeight: 'bold',
                        color: 'white'
                    }
                },
                startAngle: 0,
                endAngle: 270,
                center: ['50%', '75%']
            }
        },
        series: [{
            type: 'pie',
            name: 'Election',
            innerSize: '85%',
            data: [
                ['a',   55],
                ['b',       65],
                 ['c',   65],
                   ['d',   132],

                {
                    name: 'Proprietary or Undetectable',
                    y: 0.2,
                    dataLabels: {
                        enabled: false
                    }
                }
            ]
        }]
    });
});

enter image description here


Solution

  • You have to change data set in series and size of pie

    series: [{
                type: 'pie',
                name: 'Election',
                size: '100%',
                innerSize: '40%',
                data: [{name: "A", y: 20},
                {name: "B", y: 10},
                {name: "C", y: 15}
                ]
            }, {
                type: 'pie',
                name: 'Proprietary or Undetectable',
                innerSize: '70%',
                data: [{name: "A", y: 10},
                {name: "B", y: 15},
                {name: "C", y: 20}
    
    
                ]
            }]
    

    JS Fiddle