[d3 diagram] Fix nodes distances and diagram height.