title: adding labels to node in d3.js
body: <p>I am a newbie in d3.js</p>
  
  <p>I am trying to add labels to my nodes.
  But whatever I tried is not working..
  My code is here:</p>
  
  <p><a href="http://jsfiddle.net/Ymtg5/1/" rel="nofollow">http://jsfiddle.net/Ymtg5/1/</a></p>
  
  <p>Its a mash up between <a href="http://bl.ocks.org/christophermanning/4208494" rel="nofollow">http://bl.ocks.org/christophermanning/4208494</a>
  and force directed graphs.
  Basically I am reading a json file and creating the said graph.
  Now I want to add labels to node exactly like <a href="http://bl.ocks.org/mbostock/950642" rel="nofollow">http://bl.ocks.org/mbostock/950642</a>
  I tried adding these lines</p>
  
  <pre><code>node.append("text")
        .attr("dx", 12)
        .attr("dy", ".35em")
        .text(function(d) { return d.name });
  </code></pre>
  
  <p>But its not working.
  Any help. suggestions..
  Thanks</p>