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 () {
                  return batch_info[count % batch_info.length];


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.


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


Related Query

More Query from same tag