0

Is there a way to get highcharts and highmaps to initialize in drilldown mode?

I currently have a continents map that drills down successfully into countries. But is it possible to initialize my map in drilldown mode already...like initialize it to drilled down into North America (maybe simulate clicking the north america continent).

For example looking at this example: http://www.highcharts.com/demo/column-drilldown

It loads like this

enter image description here

But would it be possible to by default load it this way (already drilled down into Chrome) and give the option to drill back up enter image description here

es3735746
  • 841
  • 3
  • 16
  • 40
  • 1
    The general answer to all such questions is yes. It is possible and in here you can see the dd http://www.highcharts.com/demo/column-drilldown. However it is not possible to gess what exactly you need. The margin for the error is huge ⸻ – prosti Feb 01 '17 at 22:40
  • Please provide some images. – prosti Feb 01 '17 at 22:41
  • In the example here: http://www.highcharts.com/demo/column-drilldown – es3735746 Feb 01 '17 at 23:42
  • is it possible that when the map loads, it is already drilled down into "chrome" – es3735746 Feb 01 '17 at 23:42

1 Answers1

0

There is a built-in function in Highcharts for this: firePointEvent(type)

So for Chrome, you should fire this event:

chart.series[0].data[1].firePointEvent('click');

Here is the example.

Emre Bolat
  • 4,316
  • 5
  • 29
  • 32
  • 1. Does this only work in Chrome? 2. Seems like you need to know the exact index of the data point you want to drilldown into...but would it be possible to drilldown into a map based on hc-key for example or someother attribute in the chart point? – es3735746 Feb 02 '17 at 18:16
  • 1. This solution works in all major browsers. 2. Yes, you need to know the exact index of the data point. If your data is dynamic, you can give attributes or names to points. It is pure javascript. For example check this answer: http://stackoverflow.com/questions/8514457/set-additional-data-to-highcharts-series – Emre Bolat Feb 03 '17 at 05:54