Highcharts Spiderweb 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 spiderweb chart using highcharts library with examples.

Highcharts Spiderweb Chart Example

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

 

Live Preview

<html>

<head>

    <title>Highcharts Spiderweb 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/highcharts-more.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: {

                    polar: true,

                    type: 'line'

                },

                title: {

                    text: 'Budget vs spending',

                    x: -80

                },

                pane: {

                    size: '80%'

                },

                xAxis: {

                    categories: ['Sales', 'Marketing', 'Development', 'Customer Support',

                        'Information Technology', 'Administration'

                    ],

                    tickmarkPlacement: 'on',

                    lineWidth: 0

                },

                yAxis: {

                    gridLineInterpolation: 'polygon',

                    lineWidth: 0,

                    min: 0

                },

                tooltip: {

                    shared: true,

                    pointFormat: '<span style="color:{series.color}">{series.name}: <b>${point.y:,.0f}</b><br/>'

                },

                legend: {

                    align: 'right',

                    verticalAlign: 'middle'

                },

                series: [{

                    name: 'Allocated Budget',

                    data: [43000, 19000, 60000, 35000, 17000, 10000],

                    pointPlacement: 'on'

                }, {

                    name: 'Actual Spending',

                    data: [50000, 39000, 42000, 31000, 26000, 14000],

                    pointPlacement: 'on'

                }],

                responsive: {

                    rules: [{

                        condition: {

                            maxWidth: 500

                        },

                        chartOptions: {

                            legend: {

                                align: 'center',

                                verticalAlign: 'bottom'

                            },

                            pane: {

                                size: '70%'

                            }

                        }

                    }]

                }

            });

        });

    </script>

</head>

<body>

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

</body>

</html>

 

If you observe the above example, we created a spiderweb 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 Spiderweb Chart Example Result

 

This is how we can create a spiderweb chart using highcharts library with required properties.