mirror of
https://github.com/dataease/dataease.git
synced 2025-02-25 12:03:05 +08:00
Merge pull request #11250 from dataease/pr@dev-v2@chart-bubble-tooltip-fix
fix(图表-气泡地图): 修复添加提示字段并设置空值处理置为0失败的问题
This commit is contained in:
commit
b8cc3e7521
@ -61,6 +61,10 @@ export abstract class L7PlotChartView<
|
||||
if (emptyDataStrategy === 'setZero') {
|
||||
data.forEach(item => {
|
||||
item.value === null && (item.value = 0)
|
||||
item.dynamicTooltipValue?.length > 0 &&
|
||||
item.dynamicTooltipValue.forEach(ele => {
|
||||
ele.value === null && (ele.value = 0)
|
||||
})
|
||||
})
|
||||
}
|
||||
if (emptyDataStrategy === 'ignoreData') {
|
||||
@ -68,6 +72,11 @@ export abstract class L7PlotChartView<
|
||||
if (data[i].value === null) {
|
||||
data.splice(i, 1)
|
||||
}
|
||||
for (let j = data[i].dynamicTooltipValue?.length - 1; j >= 0; j--) {
|
||||
if (data[i].dynamicTooltipValue[j].value === null) {
|
||||
data[i].dynamicTooltipValue.splice(j, 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
options.source.data = data
|
||||
|
Loading…
Reference in New Issue
Block a user