Fix issue rendering undefined points in Histogram

pull/12144/head
Christopher Henn 2019-02-22 15:17:35 -08:00 committed by Chris Henn
parent 2aef8e8eef
commit b073c84b7e
1 changed files with 8 additions and 1 deletions

View File

@ -70,7 +70,14 @@ export const bin = (
for (let i = 0; i < xCol.length; i++) { for (let i = 0; i < xCol.length; i++) {
const x = xCol[i] const x = xCol[i]
if (x < xDomain[0] || x > xDomain[1]) { const shouldSkipPoint =
x === undefined ||
x === null ||
isNaN(x) ||
x < xDomain[0] ||
x > xDomain[1]
if (shouldSkipPoint) {
continue continue
} }