score:4

Accepted answer

A formatter callback is invoked on every redrawing/resizing, so the most likely scenario is that you do not reset count variable and as the result it accesses the non-existing value, e.g. batch_info[101] when the batch_info.length === 100.

You can use the modulo operator to avoid it:

formatter: function () {
                    count++;
                  return batch_info[count % batch_info.length];
                }

example: http://jsfiddle.net/ck8zhLmj/1/

but I suggest refactoring the code and dropping the usage of count variable. Instead you can include the information about data label in the series' data or point object.

score:0

A solution could be to just reload the highcharts function after a resize.

 $(window).resize(function(){
     drawVisualization();
 });

Related Query

More Query from same tag