Strgt
Posts: 37
Joined: Fri Dec 03, 2021 2:11 pm

World map Drrill-down with column chart

Hello,

I have a world drill-down map: https://jsfiddle.net/2zxwgacq/
When I click on for example one continent, I want to have the countries' values with a column chart overlay the countries like this:
https://jsfiddle.net/BlackLabel/th8a3nwk/ (But I have just one data for every country.)

I have another question:
I have value just for 80 countries. I want countries that have no value to be displayed in gray color. But when I remove the Hc-key of a country with no value, the whole map is no longer displayed. Is there any solution to this problem?

Thank you in advance for your help.

Sincerely yours
User avatar
dawid.d
Posts: 838
Joined: Thu Oct 06, 2022 11:31 am

Re: World map Drrill-down with column chart

Hello,

Thanks for contacting us with your question and I'm sorry for the late reply!

I contacted our team responsible for the maps module and got information that it is not possible to do it with column charts using the Highcharts API.

A similar thing can be achieved with the series-on-point module, but it only supports pie and sunburst chart types. The only thing I can suggest is something like in the demo below.
See: https://api.highcharts.com/highmaps/series.pie.onPoint

As for the second question, it can be fixed like this:

Code: Select all

data.forEach((d, i) => {
    const val = values.find(v => v[0] === d.properties['hc-key']);
    d.value = val ? val[1] : null;
});
(lines from 247 to 250 in the demo below)

Demo: https://jsfiddle.net/BlackLabel/u105mcsw/

I hope you will find it useful
Best regards!
Dawid Draguła
Highcharts Developer

Return to “Highcharts Maps”