Heatmap: Skip null values instead of treating as 0 (#91424)

This commit is contained in:
Leon Sorokin 2024-08-01 15:40:43 -05:00 committed by GitHub
parent 6efd52eac8
commit 7c0ee6ebe4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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]);
}
}