Merge pull request #10396 from ulleo/dev-v2

fix(图表): 修复柱线组合图不能联动的问题
This commit is contained in:
ulleo 2024-06-20 10:17:51 +08:00 committed by GitHub
commit d4ea0e6b11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,18 +1,25 @@
import { getRange } from '@/utils/timeUitils'
import { union } from 'lodash-es'
export function viewFieldTimeTrans(viewDataInfo, params) {
if (viewDataInfo && params && params.dimensionList) {
const idNameMap = viewDataInfo.fields.reduce((pre, next) => {
const fields = viewDataInfo.fields
? viewDataInfo.fields
: viewDataInfo.left?.fields || viewDataInfo.right?.fields
? union(viewDataInfo.left?.fields, viewDataInfo.right?.fields)
: []
const idNameMap = fields.reduce((pre, next) => {
pre[next['id']] = next['dataeaseName']
return pre
}, {})
const nameTypeMap = viewDataInfo.fields.reduce((pre, next) => {
const nameTypeMap = fields.reduce((pre, next) => {
pre[next['dataeaseName']] = next['deType']
return pre
}, {})
const nameDateStyleMap = viewDataInfo.fields.reduce((pre, next) => {
const nameDateStyleMap = fields.reduce((pre, next) => {
pre[next['dataeaseName']] = next['dateStyle']
return pre
}, {})