Issue in semi circular donut chart

1.2k Views Asked by At

I am trying to make a circular Donut chart -: Below is the code I am trying. Issue-: At the base of circle chart gets flat.

$(function () {
$('#container').highcharts({
    chart: {
        plotBackgroundColor: null,
        plotBorderWidth: 0,
        plotShadow: false
    },
    title: {
        text: 'Browser<br>shares',
        align: 'center',
        verticalAlign: 'middle',
        y: 50
    },
    tooltip: {
        pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
    },
    plotOptions: {
        pie: {
            dataLabels: {
                enabled: true,
                distance: -50,
                style: {
                    fontWeight: 'bold',
                    color: 'white',
                    textShadow: '0px 1px 2px black'
                }
            },
            startAngle: 1,
            endAngle: 360,
            center: ['50%', '75%']
        }
    },
    series: [{
        type: 'pie',
        name: 'Browser share',
        innerSize: '40%',
        data: [
            ['Firefox',   45.0],
            ['IE',       26.8],
            ['Chrome', 12.8],
            ['Safari',    8.5],
            ['Opera',     6.2],
            ['Others',   0.7],
             ['Safari',    8.5],
            ['Opera',     6.2],
            ['Others',   0.7]
        ]
    }]


   });
});

I want that chart appear as full circle with a whole in center of this chart . Though donut chart is available at http://www.highcharts.com/demo/pie-donut but it is like full circle with no space in between.

1

There are 1 best solutions below

0
On

I think the problem is that you set wrong center for a pie, see: http://jsfiddle.net/na86z/7/

Should be:

center: ['50%', '50%']