Skip to content

Commit 7a070fe

Browse files
author
Scott Cheng
committed
scale.quantize.invertExtent returns null when y is not in the range
1 parent d479282 commit 7a070fe

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/scale/quantize.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ function d3_scale_quantize(x0, x1, range) {
3636

3737
scale.invertExtent = function(y) {
3838
y = range.indexOf(y);
39+
if (y === -1) return null;
3940
return [y / kx + x0,
4041
(y + 1) / kx + x0];
4142
};

0 commit comments

Comments
 (0)