ElementStacks

by Fusher

HTML

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

JavaScript

var chart=null;
options = {
   chart: {
      renderTo: 'container',
      type: 'column',
   },
   title: {
      text: 'Some title'
   },
   subtitle: {
      text: 'subtitle'
   },
   xAxis: {
      categories: [],
      title: {
         text: null
      }
   },
   yAxis: {
      min: 0,
      title: {
         text: 'y-Axis',
         align: 'high'
      }
   },
   tooltip: {
      formatter: function() {
         return '' + this.series.name + ': ' + this.y + ' ';
      }
   },
   plotOptions: {
      bar: {
         dataLabels: {
            enabled: true
         }
      }
   },
   legend: {
      layout: 'vertical',
      align: 'right',
      verticalAlign: 'top',
      x: -100,
      y: 100,
      floating: true,
      borderWidth: 1,
      backgroundColor: '#FFFFFF',
      shadow: true
   },
   credits: {
      enabled: false
   },
   series: 
   []
};
$(document).ready(function() {
   chart= new Highcharts.Chart(options)
   console.log("calling update chart");    
   updateChart();
});

function updateChart() {
  var data =           [
                        {
                            "name": "name1",
                            "data": [32.6,16.6,1.5]
                        }, {
                            "name": "name2",
                            "data": [6.7,0.2,0.6]
                        }, {
                            "name": "name3",
                            "data": [1,3.7,0.7]
                        }, {
                            "name": "name4",
                            "data": [20.3,8.8,9.5]
                        },{
                            "name": "name5",
                            "data": [21.5,10,7.2]
                        }, {
                            "name": "name6",
                            "data": [1.4,1.8,3.7]
                        }, {
                            "name": "name7",
                            "data": [8.1,0,0]
                        }, {
                            "name":...