forked from github/dataease
Merge pull request #12574 from dataease/pr@dev-v2@chart-show-thumbnail-fix
fix(图表): 修复从其他图表切换到地图或者气泡地图时,缺少地区的选择时,无法显示缩略图的问题
This commit is contained in:
commit
8235e06ef2
@ -27,7 +27,7 @@ import {
|
||||
watch
|
||||
} from 'vue'
|
||||
import { useEmitt } from '@/hooks/web/useEmitt'
|
||||
import { hexColorToRGBA } from '@/views/chart/components/js/util.js'
|
||||
import { hexColorToRGBA, parseJson } from '@/views/chart/components/js/util.js'
|
||||
import {
|
||||
CHART_FONT_FAMILY_MAP,
|
||||
DEFAULT_TITLE_STYLE
|
||||
@ -578,6 +578,11 @@ const checkFieldIsAllowEmpty = (allField?) => {
|
||||
showEmpty.value = false
|
||||
if (view.value?.render && view.value?.type) {
|
||||
const chartView = chartViewManager.getChartView(view.value.render, view.value.type)
|
||||
const map = parseJson(view.value.customAttr).map
|
||||
if (['bubble-map', 'map'].includes(view.value?.type) && !map?.id) {
|
||||
showEmpty.value = true
|
||||
return
|
||||
}
|
||||
const axisConfigMap = new Map(Object.entries(chartView.axisConfig))
|
||||
// 验证拖入的字段是否包含在当前数据集字段中,如果一个都不在数据集字段中,则显示空图表
|
||||
let includeDatasetField = false
|
||||
|
Loading…
Reference in New Issue
Block a user