Echart动效系列02

饼图每隔3秒选中一项

setInterval(function () {
        var dataLen = option.series[0].data.length;//数据条数
        cwidget.currentIndex = (cwidget.currentIndex + 1) % dataLen; //当前选中项的序号
        cwidget.cirChart.dispatchAction({
            type: 'pieSelect', //执行选中饼图操作
            hoverAnimation:true,
            seriesIndex: 0,
            dataIndex: cwidget.currentIndex
        }); 
    }, 3000);   
setInterval(function () {
        var dataLen = option.series[0].data.length;
        cwidget.cirChart.dispatchAction({
            type: 'pieUnSelect', //取消前一项的选择
            hoverAnimation:true,
            seriesIndex: 0,
            dataIndex: cwidget.currentIndex%option.series[0].data.length
        }); 
    }, 3000);   
原文地址:https://www.cnblogs.com/cdoneiX/p/13188251.html