Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 CanvasJS 根据来自 Myo 的一些数字创建折线图。当新数据进来时,图表不会更新。因为我没有用初始数据点填充图表,所以它永远是空的。
我的代码:这里
试试这个方法。
可以说: var myChart = new CanvasJS.Chart(...);
然后更新图表数据使用: myChart.options.data[0].dataPoints = YOUR_DATA_ARRAY; myChart.render();
为我工作,因为我在文档中没有找到任何“更新”方法。