score:1

Accepted answer

You need to define the series names array outside of the loop and use only one name in the loop:

var seriesNames = ['MR', 'MR_HIT', 'MR_HIT_PERCENTAGE'],
...
data.forEach(function(arr) {
    arr.forEach(function(el, i) {
        if (i === 0) {
            categories.push(el);
        } else if (series[i - 1]) {
            series[i - 1].data.push(el)
        } else {
            series.push({
                name: seriesNames[i - 1],
                data: [el]
            });
        }
    });
});

Live demo: http://jsfiddle.net/BlackLabel/ewauprqh/


Related Query

More Query from same tag