1
我有一个Highchart,通过AJAX和jQuery在setInterval函数中接收JSON数据,当我使用series.data[i].y = response[i].y
时,y的值是变化,但剂量显示在图表中,点的高度有前值,但在工具提示中显示最近值?和x值doseng changhe在所有,请帮助我如何更新x和y值,如果它变动?如何更新Highchart中的点值?
chart:{ renderTo: 'container',
zoomType: 'xy',
plotBackgroundImage: 'graphics/skies.jpg',
events: {
load: function() {
var series = this.series[0];setInterval(function() {ajax({type: "POST",url: "/Home/GetData",data: null),contentType: "application/json; charset=utf-8",success: function (response) { for (var i = 0; i < response.length; i++) { if (series.data[i].y =response[i].y || series.data[i].category != response[i].x) { series.data[i].y =response[i].y; series.data[i].category = response[i].x;} }}, dataType: "json",failure: ajaxCallFailed });}, 50000);}