7.鼠标移入
2020-07-09 本文已影响0人
半生_温暖纯良_Junzer
鼠标移入显示标签,灰黑色
1.获取内容
2.显示内容
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}%)'
},
灰黑色