title: make a simple pie chart directive with d3js
body: <p>I am trying to make a simple pie chart directive with d3js and angular.js <a href="http://bl.ocks.org/mbostock/3887235" rel="nofollow">based on this example</a></p>
  
  <p>The datas are loaded with $resource. The datas are available inside the directive as a json object named 'values', but i don't know how to use them with d3. </p>
  
  <p>i tried </p>
  
  <pre><code>json = JSON.parse( values );
  </code></pre>
  
  <p>but it doesn't work. </p>
  
  <p>here is the whole code: <a href="http://plnkr.co/edit/XDyWlLY5R1ZZ4sKn5n3v?p=preview" rel="nofollow">http://plnkr.co/edit/XDyWlLY5R1ZZ4sKn5n3v?p=preview</a></p>