echart 柱体图,悬浮某个数据的时候会有灰蓝色的背景块,怎么去掉?

2023-06-27 360 0

image.png

axisPointer: {
      // Use axis to trigger tooltip
      type: 'shadow', // 'shadow' as default; can also be 'line' or 'shadow'
      shadowStyle: {
        // color: 'transparent'
        color: '#f00'
      }
    }

试试在 axisPointer 中添加 shadowStyle 属性

效果

image.png

series添加这个就行了:

  axisPointer: {
    show: false,
  },

image.png

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'
    }
  ]
};

回答

相关文章

nuxt2部署静态化和ssr的时候访问首页先报404再出现首页为什么?
`clip-path` 如何绘制圆角平行四边形呢?
多线程wait方法报错?
VUE 绑定的方法如何直接使用外部函数?
vue2固定定位该怎么做?
谁有redis实现信号量的代码,希望借鉴一下?