Highcharts Semi Circle Donut Chart

In the previous chapters, we learned how to setup highcharts library and how to create a chart with required configurations using highcharts library in our webpage. Now, we will learn how to create a semi circle donut chart using highcharts library with examples.

Highcharts Semi Circle Donut Chart Example

Following is the example of creating a semi circle donut chart by setting the required chart properties using highcharts library.

 

<html>

<head>

    <title>Highcharts Semi Circle Donut Chart</title>

    <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>

    <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>

    <script type="text/javascript">

        $(function() {

            Highcharts.chart('container', {

                chart: {

                    plotBackgroundColor: null,

                    plotBorderWidth: 0,

                    plotShadow: false

                },

                title: {

                    text: 'Browser<br>shares<br>2017',

                    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: -90,

                        endAngle: 90,

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

                        size: '110%'

                    }

                },

                series: [{

                    type: 'pie',

                    name: 'Browser share',

                    innerSize: '50%',

                    data: [

                        ['Chrome', 58.9],

                        ['Firefox', 13.29],

                        ['Internet Explorer', 13],

                        ['Edge', 3.78],

                        ['Safari', 3.42], {

                            name: 'Other',

                            y: 7.61,

                            dataLabels: {

                                enabled: false

                            }

                        }

                    ]

                }]

            });

        });

    </script>

</head>

<body>

    <div id="container" style="width: 100%; height: 400px;"> </div>

</body>

</html>

If you observe the above example, we created a semi circle donut chart by using highcharts library with required properties.

 

When we execute the above highcharts example, we will get the result like as shown below.

 

Highcharts semi circle donut chart example result

 

This is how we can create a semi circle donut chart using highcharts library with required properties.

Topics Covered