[echarts]地图轮播

Posted z5337

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[echarts]地图轮播相关的知识,希望对你有一定的参考价值。

代码片断:

来自:https://blog.csdn.net/qq_36947128/article/details/90899564

function Play()
    chart.dispatchAction(
        type:"downplay",
        seriesIndex:0,

    );
    chart.dispatchAction(
        type:"highlight",
        seriesIndex:0,
        dataIndex:hourIndex
    );
    chart.dispatchAction(
        type:"showTip",
        seriesIndex:0,
        dataIndex:hourIndex
    );
    hourIndex++;
    if(hourIndex > data.length)
        hourIndex=0;
    


var hourIndex=0;
var fhourTime = setInterval(Play, 3000);

//鼠标移入停止轮播
chart.on("mousemove", function(e) 
    clearInterval(fhourTime)
)
//鼠标移出恢复轮播
chart.on("mouseout", function() 
    fhourTime = setInterval(Play, 3000);
)    

 

以上是关于[echarts]地图轮播的主要内容,如果未能解决你的问题,请参考以下文章