ElementStacks

by johnnytrinh

HTML

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

JavaScript

var chart = new Highcharts.Chart({

    chart: {
        renderTo: 'container'
    },

    xAxis: {
        categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul',
                                 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
    },

    tooltip: {
        formatter: function() {
            var s = '<b>'+ this.x +'</b><br/>', color;
            
            $.each(this.points, function(i, point) {
                color = point.series.color;
                if (color == '#eee')
                    color = '#888';
                s += '<span style="color: '+color+'">'+ point.series.name +'</span>: '+
                    point.y +'m<br/>';
            });
            
            return s;
        },
        shared: true
    },

    series: [{
        data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]},
    {
        color: '#eee',
        data: [216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5]}]

});