diff --git a/nezha-fronted/src/components/chart/chartList.vue b/nezha-fronted/src/components/chart/chartList.vue index 370ba37c0..d4873ab9e 100644 --- a/nezha-fronted/src/components/chart/chartList.vue +++ b/nezha-fronted/src/components/chart/chartList.vue @@ -449,6 +449,19 @@ export default { // } height = (item.type === 'group' && item.param.collapse) ? this.headerH : item.height param.showHeader = true + if (param.valueMapping) { + param.valueMapping.forEach(valueMapping => { + if (!valueMapping.show) { + valueMapping.show = false + } + if (valueMapping.text && !valueMapping.display) { + valueMapping.display = valueMapping.text + } + if (valueMapping.columns && !valueMapping.column) { + valueMapping.column = valueMapping.columns + } + }) + } } return { ...item, diff --git a/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue b/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue index 62a236086..d7fd8e637 100644 --- a/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue +++ b/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue @@ -521,6 +521,8 @@ export default { } if (item.text && !item.display) { item.display = item.text + } else if (!item.display) { + item.display = '{{A.$value}}' } if (item.columns && !item.column) { item.column = item.columns