您好,欢迎来到化拓教育网。
搜索
您的当前位置:首页Echarts堆叠柱壮图设置最小高度出现重叠问题

Echarts堆叠柱壮图设置最小高度出现重叠问题

来源:化拓教育网

 求解决方法,当前堆叠图设置最小高度barMinHeight时,出现重叠现象

解决方案:更新到echarts-5.2.2,是当时版本的bug

option = {
  tooltip: {
    trigger: 'axis',
    axisPointer: {
      // Use axis to trigger tooltip
      type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
    }
  },
  legend: {},
  grid: {
    left: '3%',
    right: '4%',
    bottom: '3%',
    containLabel: true
  },
  xAxis: {
    type: 'value',

  },
  yAxis: {
    type: 'category',
    data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  },
  series: [
    {
      name: 'Direct',
      type: 'bar',
      barMinHeight:50,
      stack: 'total',
      emphasis: {
        focus: 'series'
      },
      data: [320, 302, 301, null, 390, 330, 320]
    },
    
    {
      name: 'Search Engine',
      type: 'bar',
      stack: 'total',
      barMinHeight:50,
      emphasis: {
        focus: 'series'
      },
      data: [820, 832, 901, 934, 1290, 1330, 13200]
    }
  ]
};

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- huatuo9.cn 版权所有 赣ICP备2023008801号-1

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务