Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I dynamically change a data point in Highcharts using JavaScript

Tags:

highcharts

I'm trying to change a point in an existing series. From looking at the API, I've been trying the following:

chart.series[0].data[0].y = 43;
chart.redraw();

I'm sure I'm missing something simple but I can't figure it out. Thanks for your help.

like image 316
user2124180 Avatar asked Mar 01 '13 16:03

user2124180


People also ask

Is Highcharts a JavaScript library?

Highcharts® JS Highcharts, the core library of our product suite, is a pure JavaScript charting library based on SVG that makes it easy for developers to create responsive, interactive and accessible charts.

Which config can be used to update the chart properties after the chart has been rendered?

Highcharts - Updating a chart's option after initial render.

Is it possible to pass multiple series in a chart in Highcharts?

Yes, you can.

How display no data available message in Highcharts?

Just don't create the highchart and insert text saying "No Data Available". Without any code, this is the most help you're likely to get.


1 Answers

Well it works properly for both coordinates: http://jsfiddle.net/PsBh7/

 chart.series[0].data[0].update({
                x:20
            }); 
like image 170
Sebastian Bochan Avatar answered Sep 18 '22 12:09

Sebastian Bochan