First off, thanks for the existing work on this plugin!
In using the plugin, I've found that if the number of nodes is large enough and the passed in height small enough, the layout will fail. I initially noticed this by trying to increase nodePadding from its default value. This 'bug' occurs inside initializeNodeDepth() when ky becomes negative.
var ky = d3.min(nodesByBreadth, function(nodes) {
return (size[1] - (nodes.length - 1) * nodePadding) / d3.sum(nodes, value);
});
While mathematically this isn't a bug, I would expect the layout to either not rely on a hard coded height or throw an error if there is not enough vertical space for the quantity of nodes.
First off, thanks for the existing work on this plugin!
In using the plugin, I've found that if the number of nodes is large enough and the passed in height small enough, the layout will fail. I initially noticed this by trying to increase nodePadding from its default value. This 'bug' occurs inside initializeNodeDepth() when ky becomes negative.
While mathematically this isn't a bug, I would expect the layout to either not rely on a hard coded height or throw an error if there is not enough vertical space for the quantity of nodes.