Highcharts Demo

author(s): Torstein Hønsi

by praveen_kr

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>

<div id="container" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>

JavaScript

Highcharts.chart('container', {
    chart: {
        plotBackgroundColor: null,
        plotBorderWidth: null,
        plotShadow: false,
        type: 'pie'
    },
    title: {
        text: 'Browser market shares in January, 2018'
    },
    tooltip: {
        pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
    },
    plotOptions: {
        pie: {
            allowPointSelect: true,
            cursor: 'pointer',
              events: {
                click: function (event) {
                    
                }
            },
            dataLabels: {
                enabled: true,
                format: '<b>{point.name}</b>: {point.percentage:.1f} %',
                style: {
                    color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
                }
            }
        }
    },
    series: [{
        name: 'Brands',
        colorByPoint: true,
        size:'100%',
        innerSize:'80%',
        data: [{
            name: 'Chrome',
            y: 80
           
        }, {
            name: 'Internet Explorer',
            y: 10
        }, {
            name: 'Firefox',
            y: 10
        }]
    },
    {
        name: 'Brands2',
        colorByPoint: true,
        size:'50%',
        innerSize:'40%',
        data: [{
            name: 'Chrome2',
            y: 50
           
        }, {
            name: 'Internet Explorer2',
            y: 20
        }, {
            name: 'Firefox2',
            y: 30
        }]
    }
    ]
});