Link series to different urls

Description

The following code shows how to link series to different urls.

Example


<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script type='text/javascript'>
$(function () {<!--   w  ww.java  2 s .c o m-->
    $('#container').highcharts({
        chart: {
            type: 'column'
        },
        plotOptions: {
            series: {
                cursor: 'pointer',
                point: {
                    events: {
                        click: function () {
                            location.href = this.options.url;
                        }
                    }
                }
            }
        },

        series: [{
            data: [{
                y: 9,
                url: 'http://bing.com/search?q=Java'
            }, {
                y: 21,
                url: 'http://bing.com/search?q=chart'
            }, {
                y: 10,
                url: 'http://bing.com/search?q=xml'
            }]
        }]
    });  
});
</script>
</head>
<body>
  <script src="http://code.highcharts.com/highcharts.js"></script>
  <div id="container" style="height: 400px"></div>
  
</body>
</html>

Click to view the demo





















Home »
  highcharts »
    Series »




Series
Series Color
Series Data
Series Event
Series Marker
Series Style