Skip to content

Commit 74234af

Browse files
Filmbostock
authored andcommitted
create a non-empty bar if the domain is collapsed
(e.g. binning of a one-element data) degenerate case example given by @severo in #417
1 parent 4dabda0 commit 74234af

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/transforms/bin.js

+1
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ function bincumset([bin], j, bins) {
225225
}
226226

227227
function binfilter([{x0, x1}, set]) {
228+
if (x0 === x1) x0 -= .5, x1 += .5;
228229
return [x0, x1, I => I.filter(set.has, set)]; // TODO optimize
229230
}
230231

0 commit comments

Comments
 (0)