From 7c0ee6ebe44372982d3714901d876a8b92386b3f Mon Sep 17 00:00:00 2001 From: Leon Sorokin Date: Thu, 1 Aug 2024 15:40:43 -0500 Subject: [PATCH] Heatmap: Skip null values instead of treating as 0 (#91424) --- public/app/plugins/panel/heatmap/utils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/app/plugins/panel/heatmap/utils.ts b/public/app/plugins/panel/heatmap/utils.ts index 04919f2e809..3618dcdef2d 100644 --- a/public/app/plugins/panel/heatmap/utils.ts +++ b/public/app/plugins/panel/heatmap/utils.ts @@ -597,7 +597,7 @@ export function heatmapPathsDense(opts: PathbuilderOpts) { ); for (let i = 0; i < dlen; i++) { - if (counts[i] > hideLE && counts[i] < hideGE) { + if (counts[i] != null && counts[i] > hideLE && counts[i] < hideGE) { let cx = cxs[~~(i / yBinQty)]; let cy = cys[i % yBinQty]; @@ -826,7 +826,7 @@ export const boundedMinMax = ( minValue = Infinity; for (let i = 0; i < values.length; i++) { - if (values[i] > hideLE && values[i] < hideGE) { + if (values[i] != null && values[i] > hideLE && values[i] < hideGE) { minValue = Math.min(minValue, values[i]); } } @@ -836,7 +836,7 @@ export const boundedMinMax = ( maxValue = -Infinity; for (let i = 0; i < values.length; i++) { - if (values[i] > hideLE && values[i] < hideGE) { + if (values[i] != null && values[i] > hideLE && values[i] < hideGE) { maxValue = Math.max(maxValue, values[i]); } }