From 1400a0a3f7a5b5b3c5b7258a3b5bb037b654f599 Mon Sep 17 00:00:00 2001 From: Leon Sorokin Date: Tue, 9 May 2023 23:16:35 -0500 Subject: [PATCH] Heatmap: Fix color rendering for value ranges < 1 (#68156) --- public/app/plugins/panel/heatmap/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/plugins/panel/heatmap/utils.ts b/public/app/plugins/panel/heatmap/utils.ts index da83e954125..5cf14c381ca 100644 --- a/public/app/plugins/panel/heatmap/utils.ts +++ b/public/app/plugins/panel/heatmap/utils.ts @@ -967,7 +967,7 @@ export const boundedMinMax = ( }; export const valuesToFills = (values: number[], palette: string[], minValue: number, maxValue: number) => { - let range = Math.max(maxValue - minValue, 1); + let range = maxValue - minValue || 1; let paletteSize = palette.length;