Here it is: http://codepen.io/Pestov/pen/BLpgm
Naturally you wouldn't be able to use their default tree layout because it assumes identically sized nodes but creating your own layout should be doable. If I remember correctly D3's tree layout code is 200LOC.
I am heading down this path now so I'm sorry to see both you and poster above giving up on D3 for this.
The max width parameter is optional. I am not sure what are you trying to do with the graphs though. This library is not for graphs or trees. It's for points on single axis.