diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/components/LabelSelector.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/components/LabelSelector.vue index 275b05b01c..886fea8921 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-style/components/LabelSelector.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-style/components/LabelSelector.vue @@ -1079,6 +1079,7 @@ const isProgressBar = computed(() => { :class="'form-item-' + themes" > { :class="'form-item-' + themes" > { :class="'form-item-' + themes" > { :class="'form-item-' + themes" > { formatter.splice(0, formatter.length) const axisIds = [] quotaAxis.value.forEach(axis => { + initFormatCfgUnit(axis.formatterCfg) formatter.push({ ...axis, show: true @@ -77,6 +78,7 @@ const changeChartType = () => { }) quotaData.value.forEach(quotaAxis => { if (!axisIds.includes(quotaAxis.id)) { + initFormatCfgUnit(quotaAxis.formatterCfg) formatter.push({ ...quotaAxis, seriesId: quotaAxis.id, @@ -248,9 +250,6 @@ const init = () => { const customAttr = JSON.parse(JSON.stringify(chart.customAttr)) if (customAttr.tooltip) { state.tooltipForm = defaultsDeep(customAttr.tooltip, cloneDeep(DEFAULT_TOOLTIP)) - //初始化format单位语言 - initFormatCfgUnit(state.tooltipForm.tooltipFormatter) - formatterSelector.value?.blur() // 新增图表 const formatter = state.tooltipForm.seriesTooltipFormatter @@ -260,7 +259,7 @@ const init = () => { return } formatter.forEach(f => { - initFormatCfgUnit(f) + initFormatCfgUnit(f.formatterCfg) }) const seriesAxisMap = formatter.reduce((pre, next) => { next.seriesId = next.seriesId ?? next.id @@ -617,6 +616,7 @@ onMounted(() => { :class="'form-item-' + themes" > { :class="'form-item-' + themes" >