第一篇文章,不知道写啥,就复制一小段我刚刚项目写的代码吧
var n = 5, i = 0; clearInterval(__timerId); __timerId = setInterval(function () { myChart.setOption(option, true); for (i; i < n; i++) { data.shift(); data.push(data[i]); } i = n; n < result.length ? n += 1 : n = result.length; if (i == result.length){ clearInterval(__timerId); } }, 2000);
请多多指教,谢谢各位