'Highcharts Error #16 But I'm not using Highstocks
I'm using multiple charts on the same page. I have a bar chart, an activity gauge chart and a map chart(they are loaded on different div ids).
Everything was working fine and no error messages until I added to code for the map and called the library that's needed for this to work.
After that, I kept getting this Highcharts Error #16 msg and I know that commonly that happens if I call the highcharts.js more than once on the same page or If I call both Highstock and highcharts.js at the same time.
I know that everything from highcharts.js is already included in Highstocks and that there is no need to call both but this is not the case for me since I'm not even using Highstock
These are the libraries I'm currently working with
<script src="https://code.highcharts.com/maps/highmaps.js"></script>//I started getting that error msg after I added this but my map chart won't work without it
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<script src="https://code.highcharts.com/modules/solid-gauge.js"></script>
<script src="https://code.highcharts.com/modules/series-label.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
<script src="https://code.highcharts.com/modules/accessibility.js"></script>
I couldn't make my map chart to work when I first added this line
<script src="https://code.highcharts.com/maps/highmaps.js">
So what I did was, move it all the way to the top so it would load first and that fixed the problem with my map chart but while the map and the other charts are working fine. That Highcharts Error #16 error msg is still there in my console and it bothers me.
I don't think I should just let it be because my charts are all working. There must be a solution.
I appreciate any help I can get.
EDIT: If additional code is required, let me know in the comments I will provide.
Solution 1:[1]
The error results from the fact that Highcharts is already included in Highcharts Maps. You should load Highmaps as a module.
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<script src="https://code.highcharts.com/maps/modules/map.js"></script>
<script src="https://code.highcharts.com/modules/solid-gauge.js"></script>
<script src="https://code.highcharts.com/modules/series-label.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
<script src="https://code.highcharts.com/modules/accessibility.js"></script>
Live demo: http://jsfiddle.net/BlackLabel/d5o6rvtq/
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | ppotaczek |