score:2

Accepted answer

Certainly you can

setInterval(function () {
    var point = chart.series[0].points[0],
        newVal,
        inc = 0;

    $.get('squaking', function (data) {
        newVal = point.y + data.inc;
        if (newVal < 0 || newVal > 20) {
            newVal = point.y - data.inc;
        }

        point.update(newVal);
    });
}, 3000);

I'm assuming here that "squaking" is a server side function that returns a JSON result containing a value for inc. Once the data is returned, the chart is then updated.


Related Articles