echarts icon indicating copy to clipboard operation
echarts copied to clipboard

堆叠条形图值为0时图形上数字叠加的问题

Open chenxiwei7 opened this issue 10 years ago • 4 comments

问题简述 (One-line summary)

堆叠条形图值为0时图形上数字叠加看不清楚 示例: http://echarts.baidu.com/gallery/editor.html?c=bar-y-category-stack

版本及环境 (Version & Environment)

  • ECharts 版本 (ECharts version):3
  • 浏览器类型和版本 (Browser version):chrome
  • 操作系统类型和版本 (OS Version):win10

重现步骤 (Steps to reproduce)

1.http://echarts.baidu.com/gallery/editor.html?c=bar-y-category-stack 2.更改data值为0,数字和0叠加

期望结果 (Expected behaviour)

值为0时,不显示0,或者不叠加

可能哪里有问题 (What went wrong)

ECharts配置项 (ECharts option)

option = {
{
            name: '视频广告',
            type: 'bar',
            stack: '总量',
            label: {
                normal: {
                    show: true,
                    position: 'insideRight'
                }
            },
            data:[153, 212, 201, 154, 192, 333, 417]
        },
        {
            name: '搜索引擎',
            type: 'bar',
            stack: '总量',
            label: {
                normal: {
                    show: true,
                    position: 'insideRight'
                }
            },
            data: [500, 0, 0, 0, 0, 0, 0]
        }
}

其他信息 (Other comments)

image

chenxiwei7 avatar Oct 10 '16 09:10 chenxiwei7

暂时可以这样设置来改善一下:

http://gallery.echartsjs.com/editor.html?c=xrJmRZTgkg&v=1

100pah avatar Oct 16 '16 09:10 100pah

remove the key 'stack'

Fairyshi avatar Jan 17 '17 05:01 Fairyshi

十分感谢 @100pah 的解决办法, 解决了我的大难题

pnjgyl avatar Sep 07 '17 09:09 pnjgyl

暂时可以这样设置来改善一下:

http://gallery.echartsjs.com/editor.html?c=xrJmRZTgkg&v=1

image 还是有这种问题v

yyccQQu avatar Apr 25 '19 02:04 yyccQQu