Highcharts test tool

by ethanpil

HTML

<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="height: 300px"></div>

JavaScript

$(function () {
    $('#container').highcharts({
        chart: {
            type: 'column'
        },
        title: {
            text: 'Quiz Performance'
        },
        xAxis: {
            categories: ['Bill', 'Jane', 'Bob']
        },
        yAxis: {
            title: {
                text: 'Score'
            },
            ceiling: 100
        },
        plotOptions: {
            series: {
                cursor: 'pointer',
                point: {
                    events: {
                        click: function () {
                            //alert(this.x);
                            console.log(this);
                            location.href = this.series.userOptions.urls[this.x];
                        }
                    }
                }
            }         
        },                
            series: [{
                name: 'Test 1',
                data: [[0,88], [1,77], [2,100]],
                urls: ['http://yahoo.com','http://bing.com','http://google.com']
            }, {
                name: 'Test 2',
                data: [[0,55], [1,93], [2,84]],
                urls: ['http://yahoo.com','http://bing.com','http://google.com']
            }, {
                name: 'Test 3',
                data: [[0,25], [1,63], [2,94]],
                urls: ['http://yahoo.com','http://bing.com','http://google.com']
            }]        
       
    });
});