美文网首页
7.鼠标移入

7.鼠标移入

作者: 半生_温暖纯良_Junzer | 来源:发表于2020-07-09 18:02 被阅读0次

鼠标移入显示标签,灰黑色

1.获取内容

https://www.jianshu.com/p/27ad0c1c82c3

2.显示内容

https://blog.csdn.net/xue2xue/article/details/83788704
多y轴

 formatter: function (params)  {
                    let str = ''
                     for (var i = 0, l = params.length; i < l; i++) {//有多种柱子时,用循环
                         let unit = ''
                         if(params[i].seriesName === '增速') {
                             unit = '%'
                         } else if (params[i].seriesName === '总产值') {
                            unit = '万元'
                         }
                         str +=  params[i].seriesName +'<br/>'+params[i].marker 
                                  +params[i].name+ ' : ' + params[i].value + unit + '<br/>';
                       }
                       return str
                }
                },

字体位置
https://blog.csdn.net/guaiguaiknl/article/details/79908609
字体颜色
https://www.cnblogs.com/MrZhujl/p/12973957.html
去掉移入中线
https://www.oschina.net/question/3238958_2218280?sort=default

 tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'cross',
            label: {
                backgroundColor: '#283b56'
            }
        }
    },

触发方式
https://blog.csdn.net/lwy815379128/article/details/74332165
只有a b c d c1
https://blog.csdn.net/qq_24309787/article/details/82965607

 tooltip: { // 鼠标移入显示标签,灰黑色
          trigger: 'item',
          formatter: '{a} <br/>{b} : {c} ({d}%)'
        },
灰黑色

相关文章

网友评论

      本文标题:7.鼠标移入

      本文链接:https://www.haomeiwen.com/subject/episcktx.html