-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Treemap layout (treemapBinary strategy) outputs NaN co-ordinates #157
Comments
As a notebook for easier inspection and editing: https://observablehq.com/d/d69b436a2fcc4ed6 It’s almost certainly a divide by zero here: d3-hierarchy/src/treemap/binary.js Line 37 in 46f9e8b
d3-hierarchy/src/treemap/binary.js Line 41 in 46f9e8b
|
There’s a similar bug in d3.treemapResquarify, most likely a divide by zero here: d3-hierarchy/src/treemap/resquarify.js Lines 21 to 22 in d6adccb
|
fixed by 39f420c |
I'm seeing
x0
andx1
NaN values when data contains zeroes e.g.If I sum by
val2
or use the default tiling strategy, I don't see NaNs.Example here:
https://bl.ocks.org/peterrcook/21c0582665261a5f9d270b01d1a12d76
Maybe related to #35
The text was updated successfully, but these errors were encountered: