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

This commit is contained in:
Leon Sorokin 2023-05-09 23:16:35 -05:00 committed by GitHub
parent 0d3a78d86d
commit 1400a0a3f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;