-
Notifications
You must be signed in to change notification settings - Fork 60
Cannot read property '0' of null in clipCells() #16
Comments
I’d like to look into this, but without a test case that reproduces the error, I’m not sure where to start. |
I discovered there was a problem in an intermediate library which calls into d3. The problem was that the other library defined a Sorry for the confusion. |
Thanks for letting me know. |
@brwebb do you remember how your data was sometimes incorrect? |
here's a working example with the exact data that fails in my larger project http://bl.ocks.org/micahstubbs/2e7c882e69aa10d9dc317b59baf64692 now to go figure out if something is transforming the data in the middle of the larger project before it gets to d3.voronoi() 💭 |
Unfortunately I don't remember the details. However, I think it had something to do with processing data points where the x or y value did not exist, maybe 0 or null. |
@brwebb, thanks all the same! it looks like sparse data with lots of |
@mbostock managed to make a minimal example that reproduces the issue this second example, though less minimal, logs out internal values from d3 to the console to perhaps shed some light on the error message |
|
i'm also seeing this error in the same |
@AlexanderBollbach is there a minimal example of the place you experience the error that you can share? (nice to see others encounter this same specific issue as I did 😄 ) |
I'm using d3 4.2.2. I'm getting an exception in clipCells().
Looking at the code it appears that the variable end is referenced end[0] before it is populated with a value.
https://github.com/d3/d3-voronoi/blob/master/src/Cell.js#L75
I don't have a simple test case right now since I'm seeing this exception buried under several other layers of 3rd party code that ends up calling d3.
Thanks for having a look.
The text was updated successfully, but these errors were encountered: