mirror of
https://github.com/dataease/dataease.git
synced 2026-05-14 04:12:11 +08:00
fix(图表): 修复从支持下钻的图表,下钻后切换图表到不支持下钻的图表时,下钻路径以及下钻字段不清空的问题
This commit is contained in:
committed by
jianneng-fit2cloud
parent
c17905a0db
commit
e1ecdbd20a
@@ -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)) {
|
||||
|
||||
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user