score:7
Accepted answer
The .update() method only updates the options of the existing series. To update I think you need to remove the existing series and then add the new series one at a time. An alternative would be to remove the chart and recreate it with the new data. I show the first one were an update is done below:
$('#button').click(function () {
var chart = $('#container').highcharts();
var new_serie = [{
"name": "Production",
"data": [3.5],
"color": "green"
}, {
"name": "Changeover",
"data": [3.5],
"color": "lightblue"
}, {
"name": "Technical Failure",
"data": [5],
"color": "red"
}];
//alert(new_serie); // returns objects
for (var i = chart.series.length-1; i>=0; i--) {
chart.series[i].remove();
}
for (var y = new_serie.length-1; y >= 0; y--) {
chart.addSeries(new_serie[y]);
}
});
Check this fiddle: http://jsfiddle.net/BhC4J/1/
Source: stackoverflow.com
Related Query
- Highcharts series update with animation
- Dynamic update of multiple series in highcharts
- Highcharts: trying to update series
- Highcharts - how to update series in angular?
- trying to dynamically update Highchart column chart but series undefined
- How to update Highcharts with multiple series via JSON?
- Update series using Highcharts React wrapper
- Update all Highcharts chart series synchronously
- Browser crashes after periodic update of Highcharts series data
- I want to update my series dynamically on highcharts with a click & also bring it to the original way by clicking on an other button (#previous)
- Highcharts series visibility with csv data source
- Cannot update Highcharts series in click event with highcharts-ng
- Highcharts How to update all series with ajax
- Highcharts - Update a series point [x,y] values?
- How to have multiple highcharts with different series data in vuejs without repeating code
- Highcharts Update Grouped Series Data Point Colors
- highcharts spline with multiple series update every few seconds
- Update datalabel on click of a point on the series of a highcharts timeline chart
- Highcharts Angular update chart with new options - including linked series
- Angular HighCharts Update series
- Highcharts click function update series and cancel previous update
- Update two series on the same graph dynamically with HighCharts
- How to update just data attribute under series in highcharts with json?
- highcharts series update in javascript
- Highcharts Trying to Hide/Show series
- Highcharts update series type dataloss
- How can I fix the error #17 "The requested series type does not exist" error when trying to display a highcharts graph in Vue.js?
- Highcharts - Trying to get a dyamic spline to update from left to right
- Dynamic update multible series Highcharts with single point XML file
- Highcharts Multiple Series Dynamic Column Chart Update
More Query from same tag
- How do you change the colour of each category within a highcharts column chart?
- Highmaps limit zoom range breaks zooming out
- highcharts converting area range to multiple lines on plot
- Highcharts scatter plot - make tooltip not follow pointer
- Images/Icons in datalabel not getting exported - highchart treemap
- Highcharts click event on dataLabel which is using HTML
- PHP JSON Highcharts load database result
- Vertical line on highchart, with position tied to animation frame from another div?
- data from AJAX json request not loading in HighChart
- HighCharts - bar chart with indicator
- Highcharts tickInterval every hour
- Highcharts - mouse event in chart - e.Offset solution across browsers
- How could i put a highcharts funnel to rotate 90deg
- highcharts: margin between two boxplot series
- angular io highchart socket io
- How to remove Board and HR/CFO from Highchart organization?
- how to reset Highchart chart width in percentage on Button click
- How to display custom text for a specific category in pie chart tool tip
- How automatic xAxis labels rotation in highchart
- Highcharts x axis date full range even if there is not enough data
- Highcharts - How to set datalabels format programmatically in Combo chart
- HighCharts Combination Chart
- Chart not moving fluently when adding value to two lines on interval
- Setup of Highcharts and PhantomJS on Windows 7. JSON string parse error
- Highcharts - Plot by week with and label formatter
- How to set dataLabel Format and axis label angle in R highcharter package
- how to change grid alternate color in highcharts
- Highcharts gauge fill to 100% of container
- Is it possible to Customize highcharts drillup button
- How to display the collection in the library dynamically Highcharts - Bind collection with Highcharts in MVC