axisPointer: {
// Use axis to trigger tooltip
type: 'shadow', // 'shadow' as default; can also be 'line' or 'shadow'
shadowStyle: {
// color: 'transparent'
color: '#f00'
}
}
试试在 axisPointer 中添加 shadowStyle 属性
效果
与series
添加这个就行了:
axisPointer: {
show: false,
},
https://echarts.apache.org/examples/zh/editor.html?c=bar-y-ca...
option = {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [
{
data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar'
}
]
};