title: Dynamically resize the d3 tree layout based on number of childnodes
body: <p>From this example 
  <a href="http://mbostock.github.com/d3/talk/20111018/tree.html">http://mbostock.github.com/d3/talk/20111018/tree.html</a>
  I have build a <code>d3 tree layout</code> where the root is in the middle(<code>root.x0 = width/2</code>) in the browser window and the nodes are in the downward direction instead of facing to the right.</p>
  
  <p>Is it possible to re-size the tree, such that the width of the tree is dependent 
  on the number of nodes of the tree such that if number of nodes is less, then width is less
  or else if number of nodes is greater then width is large ?</p>
  
  <p>I also need to know how <code>d3 tree layout</code> currently calculates the "<code>d.x</code>" attribute? How can I manipulate "<code>d.x</code>" attribute to adjust the spacing 
  between the nodes of the d3 tree layout. </p>