页面树结构
转至元数据结尾
转至元数据起始

(本文档仅供参考)

问题:

堆积柱图显示标签的时候,如何让数据为0的标签不显示。

解决方案:

可参考如下扩展属性实现。

{
    series: [ {
        itemStyle: {
            normal: {
                label: {
                    formatter: "function (params) {if (params.value[0] !== 0) {return params.value[0];   } else {    return '';     }            }"
                }
            }
        }
    }]
}


  • 无标签