[v9.5.x] Heatmap: Fix color rendering for value ranges < 1 (#68163)

Heatmap: Fix color rendering for value ranges < 1 (#68156)

(cherry picked from commit 1400a0a3f7)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
This commit is contained in:
Grot (@grafanabot)
2023-05-10 04:31:58 -06:00
committed by GitHub
co-authored by Leon Sorokin
parent 7ca4b317c5
commit b28ec49d2a
+1 -1
View File
@@ -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;