Merge pull request #10246 from ulleo/dev-v2

fix(图表): 修复柱线组合图钻取失效问题
This commit is contained in:
ulleo 2024-06-13 15:16:05 +08:00 committed by GitHub
commit f635b37701
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -330,11 +330,24 @@ const trackClick = trackAction => {
const curFiled = curView.drillFields[curView.drillFilters.length]
fieldIds.push(curFiled.id)
}
chartData.value?.fields.forEach(field => {
if (!fieldIds.includes(field.id)) {
fieldIds.push(field.id)
}
})
if (curView.type.includes('chart-mix')) {
chartData.value?.left?.fields?.forEach(field => {
if (!fieldIds.includes(field.id)) {
fieldIds.push(field.id)
}
})
chartData.value?.right?.fields?.forEach(field => {
if (!fieldIds.includes(field.id)) {
fieldIds.push(field.id)
}
})
} else {
chartData.value?.fields?.forEach(field => {
if (!fieldIds.includes(field.id)) {
fieldIds.push(field.id)
}
})
}
for (let i = 0; i < fieldIds.length; i++) {
const id = fieldIds[i]
const sourceInfo = view.value.id + '#' + id