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

Function .centers() returns only 3 items #15

Closed matti9410 closed 5 years ago

matti9410 commented 6 years ago

Hello :) I wanna use .centers() but when i use this I get only 3 points

0: [0, 0] 1: [1.7320508075688772, 0] 2: [0.8660254037844386, 1.5]

Why visible and not visible hexagon centers points is not return ?

Fil commented 5 years ago

You should probably set the hexbin's .extent() before calling .centers()

See https://github.com/d3/d3-hexbin#hexbin_centers