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

Highcharts Funnel Chart Example

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

 

Live Preview

<html>

<head>

    <title>Highcharts Funnel 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/funnel.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: {

                    type: 'funnel'

                },

                title: {

                    text: 'Sales funnel'

                },

                plotOptions: {

                    series: {

                        dataLabels: {

                            enabled: true,

                            format: '<b>{point.name}</b> ({point.y:,.0f})',

                            softConnector: true

                        },

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

                        neckWidth: '30%',

                        neckHeight: '25%',

                        width: '80%'

                    }

                },

                legend: {

                    enabled: false

                },

                series: [{

                    name: 'Unique users',

                    data: [

                        ['Website visits', 15654],

                        ['Downloads', 4064],

                        ['Requested price list', 1987],

                        ['Invoice sent', 976],

                        ['Finalized', 846]

                    ]

                }],

                responsive: {

                    rules: [{

                        condition: {

                            maxWidth: 500

                        },

                        chartOptions: {

                            plotOptions: {

                                series: {

                                    dataLabels: {

                                        inside: true

                                    },

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

                                    width: '100%'

                                }

                            }

                        }

                    }]

                }

            });

        });

    </script>

</head>

<body>

    <div id="container"></div>

</body>

</html>

If you observe the above example, we created a funnel 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 funnel chart example result

 

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

Topics Covered