title: how to read json file in d3 using pie chart?
body: <p>I am trying to make pie chart using <code>d3</code> <code>lib</code> .I tried first using <code>csv</code> file .It is working fine 
  here is my code
  <a href="https://plnkr.co/edit/GQVptaAULzHVRYsQCycG?p=preview" rel="nofollow noreferrer">https://plnkr.co/edit/GQVptaAULzHVRYsQCycG?p=preview</a></p>
  
  <p><strong>But</strong>
  when I used <code>json</code> file instead of <code>csv</code> file it not show <code>pie</code> chart</p>
  
  <p>here is my code
  <a href="https://plnkr.co/edit/OYH6TYPPJgshaSzPbN1e?p=preview" rel="nofollow noreferrer">https://plnkr.co/edit/OYH6TYPPJgshaSzPbN1e?p=preview</a></p>
  
  <pre><code>d3.json("data.json", function(d) {
         // alert(d)
          d.population = +d.population;
          return d;
      }, function(error, data) {
          if (error) throw error;
  
          var arc = g.selectAll(".arc")
              .data(pie(data))
              .enter().append("g")
              .attr("class", "arc");
  
          arc.append("path")
              .attr("d", path)
              .attr("fill", function(d) { return color(d.data.age); });
  
          arc.append("text")
              .attr("transform", function(d) { return "translate(" + label.centroid(d) + ")"; })
              .attr("dy", "0.35em")
              .text(function(d) { return d.data.age; });
      });
  </code></pre>
  
  <p><strong>doc</strong></p>
  
  <p><a href="https://bl.ocks.org/mbostock/3887235" rel="nofollow noreferrer">https://bl.ocks.org/mbostock/3887235</a></p>