mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 19:42:56 +08:00
Merge pull request #13795 from dataease/pr@dev-v2@chart-extremum-fix
Some checks are pending
Typos Check / Spell Check with Typos (push) Waiting to run
Some checks are pending
Typos Check / Spell Check with Typos (push) Waiting to run
fix(图表): 修复显示最值勾选后,如果切换其他视图仍然会显示的问题 #13215
This commit is contained in:
commit
6fa9795b1b
@ -917,6 +917,7 @@ const onTypeChange = (render, type) => {
|
||||
view.value.render = render
|
||||
view.value.type = type
|
||||
emitter.emit('chart-type-change')
|
||||
emitter.emit('chart-type-change-' + view.value.id)
|
||||
// 处理配置项默认值,不同图表的同一配置项默认值不同
|
||||
const chartViewInstance = chartViewManager.getChartView(view.value.render, view.value.type)
|
||||
if (chartViewInstance) {
|
||||
|
@ -54,6 +54,7 @@ import { viewFieldTimeTrans } from '@/utils/viewUtils'
|
||||
import { CHART_TYPE_CONFIGS } from '@/views/chart/components/editor/util/chart'
|
||||
import request from '@/config/axios'
|
||||
import { store } from '@/store'
|
||||
import { clearExtremum } from '@/views/chart/components/js/extremumUitl'
|
||||
|
||||
const { wsCache } = useCache()
|
||||
const chartComponent = ref<any>()
|
||||
@ -138,8 +139,7 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
const dynamicAreaId = ref('')
|
||||
const { view, showPosition, element, active, searchCount, scale } = toRefs(props)
|
||||
|
||||
const { view, showPosition, element, active, searchCount, scale, suffixId } = toRefs(props)
|
||||
const titleShow = computed(() => {
|
||||
return (
|
||||
!['rich-text', 'picture-group'].includes(element.value.innerType) &&
|
||||
@ -816,6 +816,15 @@ onMounted(() => {
|
||||
initTitle()
|
||||
}
|
||||
})
|
||||
useEmitt({
|
||||
name: 'chart-type-change-' + view.value.id,
|
||||
callback: () => {
|
||||
const chart = cloneDeep(view.value)
|
||||
chart.container =
|
||||
'container-' + showPosition.value + '-' + view.value.id + '-' + suffixId.value
|
||||
clearExtremum(chart)
|
||||
}
|
||||
})
|
||||
|
||||
const { refreshViewEnable, refreshUnit, refreshTime } = view.value
|
||||
buildInnerRefreshTimer(refreshViewEnable, refreshUnit, refreshTime)
|
||||
|
Loading…
Reference in New Issue
Block a user