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/
Source: stackoverflow.com
Related Query
- How to set the static series name to the element result based on the categories in the HighChart
- How can i set the json encode result to the highchart series data using getJSON
- Highcharts - How to set custom colors for the series
- Highcharts- how to set yAxis to the closest or exact value in the series data
- How do you set the stack order of the series in a stacked bar chart?
- How to set minimum height of data element of series in stacked bar chart?
- How to set series-label to false by default and change the color of series label text in highchart
- How to create a highchart with 3 different series categories name
- How to get Series Name Based on Selection in Highcharts
- How can I set the legend symbol color for a series when using colorByPoint?
- How to set the padding and placement if we have more than 16 data in the series
- Highstock: How do i display the series name along the line
- Highcharts: how to dynamically set up max value of yAxis, based on the displayed data?
- Highcharts column how to move series name to the title position with bigger text size
- How to suppress the bullet point and series name in Highmaps' tooltip?
- How to remove batch of points in the period based on xAxis(time) coordinates from the series in Highstock
- How to set different bar width in the same series Highchart
- Scatter plot: How to get the name of the series into a function
- How can I add a link to a Highcharts series name in the legend?
- In highcharts, how do I get all categories showing with multiple series and xAxis type set to category?
- How to set columnrange width to expand the length of the x-axis in multiple data series in Highcharts
- HighCharts Hide Series Name from the Legend
- how to set the interval of points on Y - Axis highcharts
- How to get Highcharts X-Axis Categories starting at the left most point
- How can i hide all the Series in highcharts at a time
- How to set a static minimum value for axes in Highcharts
- How can I reset the styles given to series in Highcharts?
- Highcharts - How to hide series name and Y value in tooltip
- Highcharts: How do I set dynamic data to the drilldown pie chart?
- Highcharts: how to set legend label name after chart created?
More Query from same tag
- How to set tooltip to highcharts legends?
- How to re-render a graph at a given interval that retrieves data from a controller in Rails?
- Customize Highcharts tooltip
- Plot Highchart Gauge with JSON Data
- modify Xaxis in highcharts
- Highcharts object won't work when filled in a loop
- Can't display extra tooltip data in price history chart
- Dynamically Adding A Chart into A Combo Highcharts?
- Make single bar in highcharts the width of the container
- Cannot display a legend with special character in highchart from the serie name
- Change the text of the back button on Highcharts Treemap?
- How to sort the items within each stacking column?
- Highcharts data labels overlapping columns
- custom ticks based on selected range from rangeSelector in Highstock
- Labels inside pie chart (highcharts) without the distance trick
- Having Highcharts directive how to get/change current path onClick event?
- How to make the react-highchart line type stay fixed?
- Hide axis and gridlines Highcharts
- highcharts not refreshing chart when page refreshes
- Highcharts: Is it possible to plot sunburst chart with no data values?
- javascript slider like "highstock slider"
- Highcharts.js different structure of input data
- HighChart: Show custom label on series (spline)
- Change color of pie chart on drilldown
- Removing and re-adding series while keeping the same markers
- Highcharts XRange datetime format
- How can I format the Highcharts gantt chart to be a dashed line instead of a solid line?
- Changing unit on y-axis from million (M) to show multimillion (MM) in HighCharts
- Issue on Switching Highcharts.js Spider Web Chart and Column Chart
- highcharts hide zoom reset button, call zoom reset programmatically