title: how to update specific node in D3
body: <p>I'm living updating nodes and links. I also want to change the radius of existing nodes(circles). how can i update eg a specific circle?</p>
  
  <ul>
  <li><p>When i do this below it updates all circles.</p>
  
  <pre><code>node.select("circle").attr("r", circleradius); 
  </code></pre></li>
  <li><p>when i update the node array nothing changes in the viz. </p>
  
  <pre><code>nodes[index].size = 2000;
  </code></pre></li>
  </ul>
  
  <p><a href="http://i.stack.imgur.com/YzAFC.png" rel="nofollow">this is how the outputted html looks like</a></p>
  
  <p>this is the function update code:</p>
  
  <pre><code>    function update() {
  
  
          // Restart the force layout.
          force
              .nodes(nodes)
              .links(links)
              .start();
  
  
          // Update links.
          link = link.data(links, function(d) { return d.target.id; });
  
          link.exit().remove();
  
          link.enter().insert("line", ".node")
              .attr("class", "link");
  
          // Update nodes.
          node = node.data(nodes, function(d) { return d.id; });
  
          node.exit().remove();
  
          var nodeEnter = node.enter().append("g")
              .attr("class", "node")
              .on("click", click)
              .call(force.drag); 
  
          nodeEnter.append("circle")
                  .attr("r", function(d) {   return Math.sqrt(d.size) / 2 || 24.5; });
  
          nodeEnter.append("text")
                        .attr("dy", ".35em")
                        .text(function(d) { return d.name; });
  
          node.select("circle")
              .style("fill", color);
  
      }
  </code></pre>