score:2

the problem is that the array/objects are being passed by reference on first creating the chart. after that, high charts appears to be only updating the existing objects, overwriting the originals. try the following jsfiddle. i first create the chart using empty objects. then the buttons work as expected.

http://jsfiddle.net/308zr285/

var emptydata = [{},{},{}];

$(document).ready(function() {
  chart = new highcharts.chart({
    chart: {
      renderto: 'container',
      backgroundcolor: null,
      type: 'treemap'
    },
    series: [{
      type: "treemap",
      layoutalgorithm: 'squarified',
      alternatestartingdirection: true
    }],
    title: {
      text: 'fruit consumption'
    }
  });
  chart.series[0].setdata(emptydata);
});

Related Query

More Query from same tag