echarts
echarts copied to clipboard
堆叠条形图值为0时图形上数字叠加的问题
问题简述 (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)

暂时可以这样设置来改善一下:
http://gallery.echartsjs.com/editor.html?c=xrJmRZTgkg&v=1
remove the key 'stack'
十分感谢 @100pah 的解决办法, 解决了我的大难题
暂时可以这样设置来改善一下:
http://gallery.echartsjs.com/editor.html?c=xrJmRZTgkg&v=1
还是有这种问题v