forked from github/dataease
Merge pull request #11508 from dataease/pr@dev-v2@chart-tooltip-carousel-fix
fix(图表): 修复地图、气泡地图地区为省份时,无法启用提示轮播的问题
This commit is contained in:
commit
ff95ec3885
@ -7,6 +7,16 @@ import { Scene } from '@antv/l7-scene'
|
||||
import { deepCopy } from '@/utils/utils'
|
||||
|
||||
export const configCarouselTooltip = (chart, view, data, scene) => {
|
||||
if (['bubble-map', 'map'].includes(chart.type)) {
|
||||
data = view.source.data.dataArray
|
||||
?.filter(i => i.value)
|
||||
.reduce((acc, current) => {
|
||||
if (!acc.some(obj => obj.adcode === current.adcode)) {
|
||||
acc.push(current)
|
||||
}
|
||||
return acc
|
||||
}, [])
|
||||
}
|
||||
if (carouselManagerInstances[chart.container]) {
|
||||
const instances = carouselManagerInstances[chart.container]
|
||||
instances.update(scene, chart, view, data)
|
||||
|
Loading…
Reference in New Issue
Block a user