Friday, June 19, 2015

Accessing all highcharts in a page at once

Recently I needed to call a reflow method of all hi-charts in the page for a particular event. I used following method for that.

function redrawHighcharts() {
    for (var i = 0; i < Highcharts.charts.length; i++) {
        Highcharts.charts[i].reflow();
    }
}