我这样写的,stop方法与next都可以调,就是play调不通啊。
function playOrStop(){
var timeline = chart_site.component.timeline;
var nextIndex = currentIndex+1;
if(isPasue){
timeline.stop();
}else{
timeline.paly(nextIndex,true);
}
}
官方文档:http://echarts.baidu.com/echarts2/doc/doc.html#TimelineInterface
function playOrStop(){
var timeline = chart_site.component.timeline;
var nextIndex = currentIndex+1;
if(isPasue){
timeline.stop();
}else{
timeline.paly(nextIndex,true);
}
}
官方文档:http://echarts.baidu.com/echarts2/doc/doc.html#TimelineInterface