title: Color d3 radial tree according to node property
body: <p>Similarly to this <a href="https://stackoverflow.com/questions/46438394/how-do-you-specify-node-colors-for-the-d3-radial-tree">SO question</a> I would like to build a colored radial tree with d3.js, starting from the example in <a href="https://bl.ocks.org/mbostock/4063550" rel="nofollow noreferrer">here</a>. I am a complete newbie in both javascript and d3.</p>
  
  <p>I'd like to make it so that the nodes - and/or the terminal part of the edges - are colored with different intensity according to some property encoded in the original csv. Example would be: </p>
  
  <pre><code>id,value
  flare,
  flare.analytics,
  flare.analytics.cluster,
  flare.analytics.cluster.AgglomerativeCluster,3938
  flare.analytics.cluster.CommunityStructure,3812
  flare.analytics.cluster.HierarchicalCluster,6714
  flare.analytics.cluster.MergeEdge,743
  </code></pre>
  
  <p>where I would like to color nodes depending on "value"
  This does not work:</p>
  
  <pre><code>node.append("circle")
        .attr("r", 2.5)
        .style('fill', function(d) {
          if (Number(d.value) &gt; Number(4000)){
            return "orange";
          }
        });
  </code></pre>