d3 / d3-hexbin

Group two-dimensional points into hexagonal bins.
https://observablehq.com/collection/@d3/d3-hexbin
BSD 3-Clause "New" or "Revised" License
240 stars 34 forks source link

bin(point)? #18

Open Fil opened 5 years ago

Fil commented 5 years ago

hexbin.bin(point) returns the bin that corresponds to the point, without adding the point.

When the bin is empty, we return an empty array with (x,y) properties.

But (partly because of that, and also because of rebin()), one must not trust that bin to stay up-to-date with additions and removals of points.