diff --git a/core/core-frontend/src/views/chart/components/js/panel/types/impl/l7plot.ts b/core/core-frontend/src/views/chart/components/js/panel/types/impl/l7plot.ts index 6e65dea0b7..aeef5f90e9 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/types/impl/l7plot.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/types/impl/l7plot.ts @@ -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