echarts 地图轮播图

600 阅读1分钟
  that.index = 0;
  that.echartsReact && that.echartsReact.getEchartsInstance().dispatchAction({
                type: 'downplay',
                seriesIndex: 1,    //serieIndex的索引值   可以触发多个
                dataIndex: that.index - 1
            });
            that.echartsReact && that.echartsReact.getEchartsInstance().dispatchAction({
                type: 'highlight',
                seriesIndex: 1,
                dataIndex: (that.index) % data.length
            });
            that.echartsReact && that.echartsReact.getEchartsInstance().dispatchAction({
                type: 'showTip',
                seriesIndex: 1,
                dataIndex: that.index,
            })
            that.index++
            if (that.index >= 10) {
                that.index = 0
            }
            
         // 鼠标移入暂停轮播
        this.echartsReact && this.echartsReact.getEchartsInstance().on('mouseover', () => {
            clearInterval(this.timer)
            this.timer = null
        })
         // 鼠标移入开启轮播
        this.echartsReact && this.echartsReact.getEchartsInstance().on('mouseout', () => {
             //轮播数据  
        })