echart tooltip问题(鼠标放上去显示所有和显示当个)

先看效果

 

两种方式只要修改一下 echat option里面tooltip的属性即可

 第一种:

        tooltip : {
            show: true,
             trigger: 'item'
//            trigger: 'axis',
//            axisPointer: {
//                type: 'cross',
//                label: {
//                    backgroundColor: '#6a7985'
//                }
//            }
        },

第二种就是把注释去掉

 

其实查看文档就知道,起作用的就是这个trigger

 

posted @ 2019-06-25 09:36  人在路途  阅读(5768)  评论(0编辑  收藏  举报