forked from github/dataease
refactor(图表): 优化联动高亮样式,修复柱线图中区间条形图、对称条形图联动时,联动图表没有高亮显示问题
This commit is contained in:
parent
ca35696c70
commit
dc753d708d
@ -26,6 +26,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sourcemap: true
|
sourcemap: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,6 +73,9 @@ const emit = defineEmits([
|
|||||||
'resetLoading'
|
'resetLoading'
|
||||||
])
|
])
|
||||||
|
|
||||||
|
const g2TypeSeries1 = ['bidirectional-bar']
|
||||||
|
const g2TypeSeries0 = ['bar-range']
|
||||||
|
|
||||||
const { view, showPosition, scale, terminal } = toRefs(props)
|
const { view, showPosition, scale, terminal } = toRefs(props)
|
||||||
|
|
||||||
const isError = ref(false)
|
const isError = ref(false)
|
||||||
@ -117,7 +120,7 @@ const linkageActivePre = () => {
|
|||||||
}
|
}
|
||||||
const linkageActive = () => {
|
const linkageActive = () => {
|
||||||
linkageActiveHistory.value = true
|
linkageActiveHistory.value = true
|
||||||
myChart?.setState('selected', param => {
|
myChart?.setState('active', param => {
|
||||||
if (Array.isArray(param)) {
|
if (Array.isArray(param)) {
|
||||||
return false
|
return false
|
||||||
} else {
|
} else {
|
||||||
@ -137,10 +140,16 @@ const linkageActive = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const checkSelected = param => {
|
const checkSelected = param => {
|
||||||
return (
|
if (g2TypeSeries1.includes(view.value.type)) {
|
||||||
state.linkageActiveParam.name.indexOf(param.name) > -1 &&
|
return state.linkageActiveParam.name === param.field
|
||||||
state.linkageActiveParam.category === param.category
|
} else if (g2TypeSeries0.includes(view.value.type)) {
|
||||||
)
|
return state.linkageActiveParam.category === param.category
|
||||||
|
} else {
|
||||||
|
return (
|
||||||
|
state.linkageActiveParam.name === param.name &&
|
||||||
|
state.linkageActiveParam.category === param.category
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const calcData = async (view, callback) => {
|
const calcData = async (view, callback) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user