forked from github/dataease
Merge pull request #10551 from ulleo/dev-v2
fix(图表): 修复柱线组合图设置提示中没有使用的字段后导致图表无法显示的问题
This commit is contained in:
commit
b326d967b5
@ -7,13 +7,12 @@ import cloneDeep from 'lodash-es/cloneDeep'
|
|||||||
import defaultsDeep from 'lodash-es/defaultsDeep'
|
import defaultsDeep from 'lodash-es/defaultsDeep'
|
||||||
import { formatterType, unitType } from '../../../js/formatter'
|
import { formatterType, unitType } from '../../../js/formatter'
|
||||||
import { fieldType } from '@/utils/attr'
|
import { fieldType } from '@/utils/attr'
|
||||||
import { defaultTo, partition } from 'lodash-es'
|
import { defaultTo, partition, union } from 'lodash-es'
|
||||||
import chartViewManager from '../../../js/panel'
|
import chartViewManager from '../../../js/panel'
|
||||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||||
import { storeToRefs } from 'pinia'
|
import { storeToRefs } from 'pinia'
|
||||||
import { useEmitt } from '@/hooks/web/useEmitt'
|
import { useEmitt } from '@/hooks/web/useEmitt'
|
||||||
import Icon from '../../../../../../components/icon-custom/src/Icon.vue'
|
import Icon from '../../../../../../components/icon-custom/src/Icon.vue'
|
||||||
import { deepCopy } from '@/utils/utils'
|
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
|
||||||
@ -42,7 +41,13 @@ const toolTip = computed(() => {
|
|||||||
})
|
})
|
||||||
const emit = defineEmits(['onTooltipChange', 'onExtTooltipChange'])
|
const emit = defineEmits(['onTooltipChange', 'onExtTooltipChange'])
|
||||||
const curSeriesFormatter = ref<DeepPartial<SeriesFormatter>>({})
|
const curSeriesFormatter = ref<DeepPartial<SeriesFormatter>>({})
|
||||||
const quotaData = ref<Axis[]>(inject('quotaData'))
|
const realQuota = ref<Axis[]>(inject('quotaData'))
|
||||||
|
const yAxis = computed(() => {
|
||||||
|
return union(defaultTo(props.chart.yAxis, []), defaultTo(props.chart.yAxisExt, []))
|
||||||
|
})
|
||||||
|
const quotaData = computed<Axis[]>(() => {
|
||||||
|
return props.chart.type.includes('chart-mix') ? yAxis.value : realQuota.value
|
||||||
|
})
|
||||||
const showSeriesTooltipFormatter = computed(() => {
|
const showSeriesTooltipFormatter = computed(() => {
|
||||||
return showProperty('seriesTooltipFormatter') && !batchOptStatus.value && props.chart.id
|
return showProperty('seriesTooltipFormatter') && !batchOptStatus.value && props.chart.id
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user