I'm trying to use a local CSV file to populate my D3.js pie chart. The CSV file simply consists of
label,count
Monday,379130
Tuesday,424923
Wednesday,430728
Thursday,432138
Friday,428295
Saturday,368239
Sunday,282701
The d3.js chart is the simple pie chart explained here at ZeroViscosity:
http://zeroviscosity.com/d3-js-step-by-step/step-4-loading-external-data
So far I have,
(function(d3) {
...
<input type="file" id="file_input" accept=".csv"/>
<div id="output_field"></div>
<script type="text/javascript" src="js/read-csv.js"></script>
<div id="chart"></div>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
I'm not sure how to get the data and then pass this on to the chart. How would I set this up?