如何用刷新的其他值更改高图图表的值

每当我使用新值更改高图的旧值时,高图仍会显示旧值。

每次我需要在新值添加并显示到高图之前刷新,但我不知道为什么。 有人可以帮我解决这个问题吗?

以下是我的jQuery部分代码,用于显示使用Highcharts插件的图表。

 //charts // JavaScript Document $(function() { var chart; $(document).ready(function() { $.getJSON("../php/termocouple/line_temp1.php", function(json) { chart = new Highcharts.Chart({ chart: { renderTo: 'chart1', type: 'line' }, title: { text: 'Termocouple Graph Result' }, subtitle: { text: '' }, xAxis: { title: { text: 'Sensor' }, categories: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] }, yAxis: { title: { text: 'Temperature (°C)' }, plotLines: [{ value: 0, width: 1, color: '#808080' }] }, tooltip: { formatter: function() { return '' + this.series.name + '
' + this.x + ': ' + this.y; } }, legend: { layout: 'vertical', align: 'right', verticalAlign: 'top', x: -10, y: 120, borderWidth: 0 }, series: json }); }); }); });

这是PHP后端代码,用于处理和向Highcharts提供数据

  

我现在得到了答案。 我只需要调用图形两个函数。 使用php的第一个函数只调用display子函数而没有where子句第二个函数用php调用display子函数和where子句

我只是在脚本上调用redraw来显示高图。