Skip to content

Commit aca1e7c

Browse files
committed
accept upper bound
(otherwise it's impossible to select all)
1 parent 1c58c43 commit aca1e7c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/marks/brush.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ export class Brush extends Mark {
5151
if (x) {
5252
const e = y ? [selection[0][0], selection[1][0]] : selection;
5353
const [x0, x1] = extent(e.map(x.invert));
54-
index = index.filter(i => X[i] >= x0 && X[i] < x1);
54+
index = index.filter(i => X[i] >= x0 && X[i] <= x1);
5555
}
5656
if (y) {
5757
const e = x ? [selection[0][1], selection[1][1]] : selection;
5858
const [y0, y1] = extent(e.map(y.invert));
59-
index = index.filter(i => Y[i] >= y0 && Y[i] < y1);
59+
index = index.filter(i => Y[i] >= y0 && Y[i] <= y1);
6060
}
6161
}
6262
const dots = selection ? Array.from(index, i => J[i]) : data;

0 commit comments

Comments
 (0)