Skip to content Skip to sidebar Skip to footer

Show/update Separate Bar Graphs With Drilldown Pie Chart Of Highcharts

I am trying to Show/Update a Bar graph in a different div with drilldown of piechart. I am using highcharts - http://www.highcharts.com/demo/pie-drilldown Basically, at page load,

Solution 1:

You can update the bargraph's data on drilldown events.

So if you have two sets of data, e.g.

varbargraphData= {
  bar1: [1,2,3,4,5],
  bar2: [5,4,3,2,1]
}

You can update bargraph's series - on drilldown with the second set of data, on drillup with the first.

 chart: {
    type: 'pie',
    events: {
      drilldown: function () {
        bargraph.series[0].update({
          data: bargraphData['bar2']
        });
      },
      drillup: function () {
        bargraph.series[0].update({
          data: bargraphData['bar1']
        });
      }
    }
},

example: http://jsfiddle.net/n2kttm9x/

Post a Comment for "Show/update Separate Bar Graphs With Drilldown Pie Chart Of Highcharts"