I've got a highcharts chart with the drilldown module which works just fine. At some point I'd like to update the chart with a new set of data. I use
chart.options.drilldown.series = drilldownSeries;
//This forces the chart to go back to level one
chart.series[0].setData(brandsData);
And it gives a nice animation with the updated data. However when I am 'drilled down' and I use the setData the chart goes back to the first level, as if I wasn't drilled down.
See: http://jsfiddle.net/n0y4vu24/1/
First: Press update data - You see the first bar moving to 20 which is fine. Run jsfiddle again, but before pressing update data click the first bar. Now when you press update data it will go back to the 'brands' chart not stay and update the drill down chart
Is there a way to stay at the current chart / current level of the drilldown?
It is caused because you update first serie (index 0), not drilldown serie. So behaviour is correct, but in your case you need to destroy chart and prepare new one with new data, because setData is not available in the drilled points.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With