diff --git a/core/core-frontend/src/views/chart/components/editor/index.vue b/core/core-frontend/src/views/chart/components/editor/index.vue index 41fa337712..9d6116b6b0 100644 --- a/core/core-frontend/src/views/chart/components/editor/index.vue +++ b/core/core-frontend/src/views/chart/components/editor/index.vue @@ -262,9 +262,6 @@ const chartStyleShow = computed(() => { }) const chartViewInstance = computed(() => { - if (view.value.render === 'highchart') { - return chartViewManager.getChartView('antv', view.value.type) - } return chartViewManager.getChartView(view.value.render, view.value.type) }) const showAxis = (axis: AxisType) => chartViewInstance.value?.axis?.includes(axis) @@ -559,6 +556,33 @@ const showAggregate = computed(() => { return false }) +const disableUpdate = computed(() => { + let flag = false + if (view.value.type === 'table-info') { + return flag + } + if (!chartViewInstance.value) { + return flag + } + const axisConfig = chartViewInstance.value.axisConfig + if (!axisConfig) { + return flag + } + for (const key in axisConfig) { + if (Object.prototype.hasOwnProperty.call(axisConfig, key)) { + const axis = view.value[key] + if (axis instanceof Array) { + axis.forEach(a => { + if (a.desensitized) { + flag = true + } + }) + } + } + } + return flag +}) + const addAxis = (e, axis: AxisType) => { recordSnapshotInfo('calcData') const axisSpec = chartViewInstance.value?.axisConfig[axis] @@ -2482,6 +2506,7 @@ onMounted(() => {