title: How do I color labels for my pie chart in D3?
body: <p>I started out with the following example:</p>
  
  <p><a href="http://jsfiddle.net/nrabinowitz/GQDUS/" rel="nofollow">http://jsfiddle.net/nrabinowitz/GQDUS/</a></p>
  
  <p>I am trying to get the labels for each arc to be the color of the arc.</p>
  
  <p>I have gotten it to where it colors all the labels the same color.  But I do now know how to access each individual label and change the color.</p>
  
  <p>In my code I have done the following for the last line:</p>
  
  <pre><code>    arcs.append("svg:text").attr("transform", function (d){var c = arc.centroid(d); x =   c[0]; y = c[1]; h = Math.sqrt(x*x + y*y);  return "translate(" + (x/h * 100) + ',' + (y/h * 90) + ")";}).text(function(d){return Math.round((d.data/total)*100)+"%";}).attr("text-anchor","middle").attr("fill","color_data.pop()");
  </code></pre>
  
  <p>This makes all the labels the first color in my array.  However I need each label to be a different color in the array.  I am just not sure how to access the labels so I can loop through and change the color.</p>