I have tried the suggestion in this answer but it makes no difference whatsoever.
I'm using the standard collapsible tree example from the D3 website.
Specifically, I've added the following, as the answer suggests:
var tree = d3.layout.tree()
.separation(function(a, b) { return ((a.parent == root) && (b.parent == root)) ? 3 : 1; })
.size([height, width - 160]);
But nothing. The documentation also suggests adjusting the separation
attribute but modifying the default one listed there with any random value seems to produce no effect on the layout:
.separation(function(a, b) { return a.parent == b.parent ? 1 : 7; }) // no effect
Am I missing something obvious? I've not done any JavaScript or jQuery and it's my first time using this library so I'm just trying to go along as I can.
The reason for trying to accomplish this is that the names of each node are quite long and when expanding a child node with lots of children, they overlap in an ugly way (I'm using different json data to the one in the example).