在Highcharts中动态更改一系列数据 [英] Changing data dynamically for a series in Highcharts
本文介绍了在Highcharts中动态更改一系列数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个图表,可以很好地处理选项中的数据,当我将某个系列的数据留空并尝试以下操作(以便我可以根据单击更改数据)不起作用时,有什么主意吗?
I have a chart working fine with data in the options, when I leave the data empty for a series and try the below (so I can change the data depending on a click) it doesn't work, any ideas?
options.series[0].data = [35.00,35.91,36.82,37.73,38.64];
var chart = new Highcharts.Chart(options);
推荐答案
您也可以使用series.setData()
.这将使您可以更改特定系列的全部数据.
you can also go with series.setData()
. This will allow you to change the entire data of a particular series.
这里是API 链接.
希望这对您有用.
这篇关于在Highcharts中动态更改一系列数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文