I'm using d3.v4 for this. When I have
var treemap = d3.tree().size([height, width])
the tree is nicely centred
but (because I want to specify the vertical spacing between nodes) when I change this to
var treemap = d3.tree().size([height, width]).nodeSize([40]);
the tree moves to the top left:
Does anyone know why this might be happening?

