There was an error while loading. Please reload this page.
1 parent 76400ac commit 7a4a8ecCopy full SHA for 7a4a8ec
1 file changed
examples/treemap/treemap.js
@@ -48,6 +48,6 @@ function cell() {
48
this
49
.style("left", function(d) { return d.x + "px"; })
50
.style("top", function(d) { return d.y + "px"; })
51
- .style("width", function(d) { return d.dx - 1 + "px"; })
52
- .style("height", function(d) { return d.dy - 1 + "px"; });
+ .style("width", function(d) { return Math.max(0, d.dx - 1) + "px"; })
+ .style("height", function(d) { return Math.max(0, d.dy - 1) + "px"; });
53
}
0 commit comments