Alnitam
Posts: 4
Joined: Mon Nov 15, 2021 1:50 pm

Mappie not showing up

Hello,

I'm trying to display a map with colored zones. Each colored zone is supposed to have a mappie attached to them. Everything seems to be OK but no mappie is showing up. I'm unable to find out why.
Here is my JSFiddle : https://jsfiddle.net/dysjhuaq/

I took the major part from the exemple of "USA 2016 Presidential Election Results" :
https://jsfiddle.net/gh/get/library/pur ... o/map-pies

Thank you if you could help me.
Best regards.
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Mappie not showing up

Hi,

Welcome to our forum and thanks for contacting us with your question!
At the beginning, sorry for the long waiting time for an answer.

By comparing your code with the example of "USA 2016 Presidential Election Results" you can see that you are missing the part of the code responsible for adding the mappie series. This code starts at 275 lines in example (https://jsfiddle.net/gh/get/library/pur ... o/map-pies). You should adjust it according to your data.

Let me know if you have any further questions!
Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/
Alnitam
Posts: 4
Joined: Mon Nov 15, 2021 1:50 pm

Re: Mappie not showing up

Hi,
Thank you for your answer and thank you for having spent your time on my problem.
But I don't understand. My code seems very similar to the exemple, starting line 10573 (sorry for the long script). My variable "camembert" defines the series and is added line 10622.
The console.log( camembert); shows an object which seems valid to my eyes.

Best regards.
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Mappie not showing up

Hi,

I think this is a problem with your custom map. I tried to use it in Highcharts demo and the pie chart does not appear either, but there was no such problem when, for example, I used another map from the Highchars map collection. You should make sure your custom map structure is correct.

Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/
Alnitam
Posts: 4
Joined: Mon Nov 15, 2021 1:50 pm

Re: Mappie not showing up

Hi,
Thank you for your advice.
I retried with the official map : https://code.highcharts.com/mapdata/cou ... all-all.js
Unfortunately, it doesn't work.
I made a modification : replace "hc-key" by the official number (more convenient for me).

My custom map is really the same. Hc-key name is replaced by the official number; I changed some accentuated letters; I added some areas to meet my needs.

I made a lot of tests, I'm unable to solve my problem. I will give up.

Thank you and best regards.
User avatar
KacperMadej
Posts: 4632
Joined: Mon Sep 15, 2014 12:43 pm

Re: Mappie not showing up

Hi,

Your demo is based on Highcharts Maps older than v9.3.0 - you could compare the code of your demo with the currently available demo online.

You have not copied all required code into your demo and the positioning of the pie series (mappie) is not working correctly in your demo.

Use Highcharts Maps version 9.2 if you want to continue with your code - https://jsfiddle.net/BlackLabel/y54qoran/
If you want to use v9.3+ you will have to copy the new code for mappie from the official demo and adjust your code.

There is also another option: mappie series is planned for Highcharts Maps that will work out-of-the box - no custom code required, so could use v9.2 for now and wait until that feature will be fully implemented.

Please let us know if you have any more questions and if there is anything unclear so we could provide more info.

Best regards,
Kacper Madej
Highcharts Developer
Alnitam
Posts: 4
Joined: Mon Nov 15, 2021 1:50 pm

Re: Mappie not showing up

Hi,
Sorry for the delay in my response.
Thank you, you're totally right. I made my code before v9.3 and linked my page with the "current" version which changed in the meantime.
I linked my page with v9.2 and the pies appeared !

Thank a lot. I'll wait the future version of HighMaps.

Thanks ! Best regards.
User avatar
KacperMadej
Posts: 4632
Joined: Mon Sep 15, 2014 12:43 pm

Re: Mappie not showing up

Hi,

No problem. Happy to hear it worked for you.
In case of any further questions about Highcharts please let us know.

Best regards,
Kacper Madej
Highcharts Developer

Return to “Highcharts Maps”