label = { "show": true, "position":"right", "formatter": function(x) { if (x.value == '0') return ''; return echarts.format.addCommas(x.value); } } console.log(eval(label))