EzekielAxel
Posts: 8
Joined: Thu Aug 27, 2020 10:15 am

React Highmaps with drilldown?

I'm trying to build a drilldown map in React using an API call that brings back json data. I'm able to get the inital (US) map to render as expected, but I'm having trouble with the drilldown. When I click a state to initiate the drilldown, it just rerenders the same map. I've read some the documentation and looked at other examples, but I'm unsure as to how the data needs to be formatted for the drilldown to work. My data contains city, state, zip, hc-key, and values, but I don't know how to implement the joinBy or make the associations between the series and the drilldown. I'm also open to using the us-counties demo, but I don't know how to get the "code" or "county" given the data that I have. Any suggestions would be greatly appreciated. Thanks in advance.
dominik.c
Posts: 2081
Joined: Fri Aug 07, 2020 7:07 am

Re: React Highmaps with drilldown?

Hello EzekielAxel,

Thanks for contacting us with your question!

There is already a very similar topic to yours:
viewtopic.php?t=42081

Here you've got a demo of Highmaps with implemented drilldown in React:
https://codesandbox.io/s/highcharts-react-demo-uti0o

Let me know if you have any further questions!
Kind regards.
Dominik Chudy
Highcharts Developer
EzekielAxel
Posts: 8
Joined: Thu Aug 27, 2020 10:15 am

Re: React Highmaps with drilldown?

EzekielAxel wrote: Fri Aug 28, 2020 7:41 am I'm trying to build a drilldown map in React using an API call that brings back json data. I'm able to get the inital (US) map to render as expected, but I'm having trouble with the drilldown. When I click a state to inhttps://19216811.cam/ https://1921681001.id/ https://jpgtopdf.onl/ itiate the drilldown, it just rerenders the same map. I've read some the documentation and looked at other examples, but I'm unsure as to how the data needs to be formatted for the drilldown to work. My data contains city, state, zip, hc-key, and values, but I don't know how to implement the joinBy or make the associations between the series and the drilldown. I'm also open to using the us-counties demo, but I don't know how to get the "code" or "county" given the data that I have. Any suggestions would be greatly appreciated. Thanks in advance.

thankyou issue got solved!!
dominik.c
Posts: 2081
Joined: Fri Aug 07, 2020 7:07 am

Re: React Highmaps with drilldown?

That's great.

Let me know if you have any further questions!
Best regards.
Dominik Chudy
Highcharts Developer

Return to “Highcharts Maps”