fix: 优化 chartTepm的显示 以及 旧数据 的 valueMapping无法展开的问题

This commit is contained in:
zhangyu
2022-01-06 17:42:38 +08:00
parent 3a7233162c
commit 39302d4c46
2 changed files with 28 additions and 0 deletions

View File

@@ -458,12 +458,20 @@ export default {
valueMapping: false
}
}
// this.editChart.varType = 1
if (this.editChart.param.enable.legend && !this.editChart.param.legend) {
this.editChart.param.legend = { placement: 'bottom', values: [], show: true }
}
if (this.editChart.param.datasource && !this.editChart.param.datasource[0].legend) {
this.editChart.param.datasource[0].legend = ''
}
if (this.editChart.param.valueMapping) {
this.editChart.param.valueMapping.forEach(item => {
if (!item.show) {
item.show = false
}
})
}
}
}
},