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 ca05dc090c..2e2b94c6c5 100644 --- a/core/core-frontend/src/views/chart/components/editor/index.vue +++ b/core/core-frontend/src/views/chart/components/editor/index.vue @@ -1064,11 +1064,7 @@ const onTypeChange = (render, type) => { emitter.emit('removeAxis', { axisType: 'yAxis', axis, editType: 'remove' }) } } - if ( - view.value.type === 'liquid' || - view.value.type === 'gauge' || - view.value.type === 'indicator' - ) { + if (['liquid', 'gauge', 'indicator', 'multi-scatter', 't-heatmap'].includes(view.value.type)) { removeItems('drillFields') } if (!['line', 'area', 'bar', 'bar-group'].includes(view.value.type)) { diff --git a/core/core-frontend/src/views/chart/components/views/index.vue b/core/core-frontend/src/views/chart/components/views/index.vue index 8dbf12ea59..e8a4362e39 100644 --- a/core/core-frontend/src/views/chart/components/views/index.vue +++ b/core/core-frontend/src/views/chart/components/views/index.vue @@ -873,6 +873,12 @@ onMounted(() => { chart.container = 'container-' + showPosition.value + '-' + view.value.id + '-' + suffixId.value clearExtremum(chart) + // 切换到不支持下钻的图表类型时,清除下钻状态 + const chartView = chartViewManager.getChartView(view.value.render, view.value.type) + if (chartView && !chartView.axis.includes('drill')) { + state.drillClickDimensionList = [] + state.drillFilters = [] + } } }) if (showPosition.value === 'viewDialog') {