Skip to content

Commit ef1338f

Browse files
Filmbostock
authored andcommitted
fix the bins for non-faceted data
test/diamonds-carat-price-dots.html was broken after facet (0863b76)
1 parent 3dbfd93 commit ef1338f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/transforms/bin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export function bin1(options = {}) {
3131
export function bin2({x = {}, y = {}, domain, thresholds} = {}) {
3232
const binX = bin1({domain, thresholds, value: first, ...maybeValue(x)});
3333
const binY = bin1({domain, thresholds, value: second, ...maybeValue(y)});
34-
return data => {
35-
return cross(binX(data), binY(data).map(binset), (x, y) => {
34+
return (facetData, data) => {
35+
return cross(binX(facetData, data), binY(facetData, data).map(binset), (x, y) => {
3636
return {
3737
x0: x.x0,
3838
x1: x.x1,

0 commit comments

Comments
 (0)