echarts怎么实现柱状图存在但是显示却是看不到的隐藏占位

2025-04-26 14:59:21
推荐回答(1个)
回答1:

//标签,并且非0显示,加在series中 itemStyle: { normal: { label: { show: true, position: 'top', textStyle: { color: '#615a5a' }, formatter:function(params){ if(params.value==0){ return ''; }else { return params.value; } } } } },