array.prototype.foreach called on null or undefined highcharts

2.7k views Asked by At

I am working on Highcharts highmaps rich information on click chart.First time load the information by json array and its working fine.But when I am filter data using filters and load chart again it`s give me same error array.prototype.foreach called on null or undefined highcharts at below lines.What is solution for this?

proceed.apply(this, Array.prototype.slice.call(arguments, 1));
var points = mapChart.getSelectedPoints();

Below link I am using as reference: http://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/maps/demo/rich-info/

1

There are 1 answers

0
Datsos On

I will answer this question in case someone else bumps into this problem in the future (even though I saw your problem is solved in github).

I encountered this issue with Highcharts when resizing the website (having 2 pie charts and one bar graph). I managed to solve it by wrapping the initialization of the graphs in a document.ready:

$(() => {
    controller.initializePieHighChart();
    controller.initializeBarHighChart();
});