score:84
chart.series[0].setData(data,true);
The setData
method itself will call the redraw method
score:0
@RobinL as mentioned in previous comments, you can use chart.series[n].setData(). First you need to make sure you’ve assigned a chart instance to the chart variable, that way it adopts all the properties and methods you need to access and manipulate the chart.
I’ve also used the second parameter of setData() and had it false, to prevent automatic rendering of the chart. This was because I have multiple data series, so I’ll rather update each of them, with render=false, and then running chart.redraw(). This multiplied performance (I’m having 10,000-100,000 data points and refreshing the data set every 50 milliseconds).
score:10
var newData = [1,2,3,4,5,6,7];
var chart = $('#chartjs').highcharts();
chart.series[0].setData(newData, true);
Explanation:
Variable newData
contains value that want to update in chart. Variable chart
is an object of a chart. setData
is a method provided by highchart to update data.
Method setData contains two parameters, in first parameter we need to pass new value as array and second param is Boolean value. If true
then chart updates itself and if false
then we have to use redraw()
method to update chart (i.e chart.redraw();
)
score:13
you have to call set and add functions on chart object before calling redraw.
chart.xAxis[0].setCategories([2,4,5,6,7], false);
chart.addSeries({
name: "acx",
data: [4,5,6,7,8]
}, false);
chart.redraw();
Source: stackoverflow.com
Related Query
- Highcharts saying undefined is not a function when trying to add a new chart
- Highcharts - column chart redraw animation
- Highcharts chart redraw while exporting
- Change chart type and redraw with multiple series in Highcharts
- HighCharts Stock Chart error code 18
- highcharts IE8 redraw chart issue
- Redraw the pie chart in oval shape highcharts
- Highcharts - Redraw empty chart
- how to add new index Highcharts column drilldown chart
- HighCharts. Angular. Redraw Chart with new Series on Event Click
- Highcharts display label for pie chart using html table as data source
- How do I get Highcharts chart redraw to move faster?
- I am using click event to trigger a new page to generate the drill down data from highcharts however the entire chart is being generated
- Use exported data from Highcharts Editor in a new React chart
- Highcharts export chart new window/tab
- Add new series to the top of a highcharts stacked column chart
- Onclick redraw the chart with new values in bar chart
- Buttons not working on subsequent tabs to redraw chart in Highcharts
- Highcharts Angular update chart with new options - including linked series
- Highcharts redraw series in chart
- Highcharts cloud issue with data source when duplicating chart
- HighCharts - destroy before writing a new chart (to prevent memory leak)
- Redraw issue in Highcharts 3D Scatter Chart
- Redraw Highcharts Organization Chart after collapse
- Highcharts chart didn't redraw after vue data changed
- How do I stop Highcharts creating a new gridline at the extremities of the chart unless a data point exceeds the min/max gridline?
- HighCharts - When I download csv, can I switch data source to new one?
- Change Highcharts xAxis step value on chart redraw event?
- How to create a column range chart in Highcharts using range and navigator functions?
- How can I get access to a Highcharts chart through a DOM-Container?
More Query from same tag
- R Highcharter margins go weird depending on y-max
- Highcharts tooltip background according to line
- Highcharts - Toggling the lines that run parallel to X axis for each value on Y axis?
- Highcharts - Overlapping scatterplot labels are not readable
- High Charts tooltip
- Tags disappeared from tagcloud in highcharts while using deriveFontSize method
- Is there any way to disable hover action on particularly some nodes in networkchart of highcharts based on the node color.?
- Javascript basic issue regarding passing parameters
- Showing arrays in an array in tooltip in Highcharts
- Highchart redraw is throwing error Uncaught TypeError: Cannot read property 'length' of undefined(…)
- HighCharts - Don't show line or change line style if date not reached
- How To Load Plist Data On HighChart Using Objective C?
- Load Unknown Number of Charts with Django Chartit
- How to add different click events on each pie of a pie chart created by highcharts usin jquery
- Highcharts - How to remove tooltip arrows
- Highcharts x-range how to show Data?
- Why chart dont load when i change json file
- Highcharts - Adding a point with addPoint stretches time
- Highcharts X-Axis value on top of stacked column
- Remove extra chart area on Highcharts Gantt chart
- Highcharts -- Array not assigned without alert message
- Highchart axis hover
- Trouble adding a highchart indicator to Ionic v4 app
- Highcharts-exporting-server gives - phantom - queue is full, dropping request Error
- HighCharts showing wrong month
- How to make Column type series Secondary yAxis values dynamic and not always start with 0?
- Highchart ctor doesn't return a Chart
- Highcharts.js How to put current time label in the end of xAxis
- Donut Inner Text
- Highchart always show max value for y Axis