mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 13:32:18 +08:00
refactor: 分组堆叠柱状图堆叠项支持联动
This commit is contained in:
committed by
xuwei-fit2cloud
parent
748df6a53e
commit
ba2dda1ceb
@@ -554,12 +554,14 @@ const linkageFieldAdaptor = async data => {
|
||||
const curCheckAllAxisStr =
|
||||
JSON.stringify(state.curLinkageViewInfo.xAxis) +
|
||||
JSON.stringify(state.curLinkageViewInfo.xAxisExt) +
|
||||
JSON.stringify(state.curLinkageViewInfo.extStack) +
|
||||
(state.curLinkageViewInfo.type.includes('chart-mix')
|
||||
? JSON.stringify(state.curLinkageViewInfo.extBubble)
|
||||
: '')
|
||||
const targetCheckAllAxisStr =
|
||||
JSON.stringify(targetChartDetails.xAxis) +
|
||||
JSON.stringify(targetChartDetails.xAxisExt) +
|
||||
JSON.stringify(state.curLinkageViewInfo.extStack) +
|
||||
(targetChartDetails.type.includes('chart-mix')
|
||||
? JSON.stringify(targetChartDetails.extBubble)
|
||||
: '')
|
||||
@@ -586,6 +588,7 @@ const sourceLinkageInfoFilter = computed(() => {
|
||||
JSON.stringify(state.curLinkageViewInfo.xAxis) +
|
||||
JSON.stringify(state.curLinkageViewInfo.drillFields) +
|
||||
JSON.stringify(state.curLinkageViewInfo.xAxisExt) +
|
||||
JSON.stringify(state.curLinkageViewInfo.extStack) +
|
||||
(state.curLinkageViewInfo.type.includes('chart-mix')
|
||||
? JSON.stringify(state.curLinkageViewInfo.extBubble)
|
||||
: '') +
|
||||
|
||||
@@ -435,10 +435,28 @@ const trackClick = trackAction => {
|
||||
if (!param?.data?.dimensionList) {
|
||||
return
|
||||
}
|
||||
let checkName = state.pointParam.data.name
|
||||
// 对多维度的处理 取第一个
|
||||
if (state.pointParam.data.dimensionList.length > 1) {
|
||||
checkName = state.pointParam.data.dimensionList[0].id
|
||||
let checkName = undefined
|
||||
if (param.data.dimensionList.length > 1) {
|
||||
// 分组堆叠处理 去能比较出来值的那个维度
|
||||
if (view.value.type === 'bar-group-stack') {
|
||||
const length = param.data.dimensionList.length
|
||||
// 存在最后一个id
|
||||
if (param.data.dimensionList[length - 1].id === param.data.dimensionList[length - 2].id) {
|
||||
param.data.dimensionList.pop()
|
||||
}
|
||||
param.data.dimensionList.forEach(dimension => {
|
||||
if (dimension.value === param.data.category) {
|
||||
checkName = dimension.id
|
||||
}
|
||||
})
|
||||
}
|
||||
if (!checkName) {
|
||||
// 对多维度的处理 取第一个
|
||||
checkName = param.data.dimensionList[0].id
|
||||
}
|
||||
}
|
||||
if (!checkName) {
|
||||
checkName = param.data.name
|
||||
}
|
||||
// 跳转字段处理
|
||||
let jumpName = state.pointParam.data.name
|
||||
|
||||
Reference in New Issue
Block a user