长话短说,先看效果效果图思路来一个定时器setInterval每隔一秒触发一次showTip展示tootip关键代码如下:(派发一次,就弹出一次tootip)tootip切换就是更改一下数据的下标索引dataIndexchart.dispatchAction({
type: 'showTip',
seriesIndex: 0,
dataIndex: i
})最后当鼠标移入进去以后,再取消定时器轮播即可当然,需要绑定一些鼠标事件完整代码(复制粘贴即可使用)option配置项数据在option中的dataset里面const option = ref({
"legend": {
"show": true,
"top": "5%",
"textStyle": {
"color": "#B9B8CE"
},
"pageTextStyle": {
"color": "#B9B8CE"
},
"orient": "horizontal",
"itemGap": 14,
"padding": -14
},
"xAxis": {
"show":
...
继续阅读
(69)