title: D3 barchart with ajax data
body: <p>I am using the example chart from <a href="http://bl.ocks.org/mbostock/3885304" rel="nofollow">http://bl.ocks.org/mbostock/3885304</a> and rather than use the tsv example, I wish to use json from api call.</p>
  
  <p>The chart does display, in the sense that it gives a large blob of what looks like a single bar.</p>
  
  <p>The JSON returned from the api.php call looks like this</p>
  
  <pre><code>[{"id":"2","name":"wombat","total":"98000","record_date":"2016-01-21 00:00:00"},{"id":"5","name":"wombat","total":"96000","record_date":"2016-02-21 00:00:00"},{"id":"8","name":"wombat","total":"93000","record_date":"2016-03-21 00:00:00"},{"id":"11","name":"wombat","total":"91000","record_date":"2016-04-21 00:00:00"},{"id":"14","name":"wombat","total":"92000","record_date":"2016-05-21 00:00:00"},{"id":"17","name":"wombat","total":"83000","record_date":"2016-06-21 00:00:00"},{"id":"20","name":"wombat","total":"81000","record_date":"2016-07-21 00:00:00"}]
  </code></pre>
  
  <p><a href="http://plnkr.co/edit/DS567RjDTZ4Evibh4sFX?p=info" rel="nofollow">Plunker</a></p>
  
  <p>Thanks
  Kevin</p>