柱状图标签

This commit is contained in:
花有清香月有阴
2021-12-27 09:54:45 +08:00
parent 638a84ca0e
commit 038b46729c

View File

@@ -193,6 +193,7 @@ export default {
initEchart(data) {
var option = {
tooltip: {},
xAxis: {
type: 'category',
data: data.map((v) => v.name.replace('数量', '').replace('和操办登记', '')),
@@ -225,7 +226,7 @@ export default {
},
},
axisLabel: {
show: true, //是否显示刻度标签
show: true,
interval: 0,
},
},
@@ -244,6 +245,13 @@ export default {
color: '#919191',
fontSize: 16,
},
formatter: function (params) {
if (params.value > 0) {
return params.value
} else {
return ' '
}
},
},
},
},