echarts 滚动_-ECharts 轮播tooltip - type: '
效果如下:(贴不了视频!)..........
核心js代码:
const showTooltip = (myChart: any) => {
myChart.dispatchAction({
// 取消之前高亮的图形
type: 'downplay',
seriesIndex: 0,
dataIndex: currentIndex,
})
currentIndex = (currentIndex + 1) % dataLen
// 高亮当前图形
myChart.dispatchAction({
type: 'highlight',
seriesIndex: 0,
dataIndex: currentIndex,
})
// 显示 tooltip 拼多多帮助力入口
myChart.dispatchAction({
type: 'showTip',
seriesIndex: 0,
dataIndex: currentIndex,
})
},echarts