Reputation: 61
I am trying to read an external csv in JSFiddle using d3.js
I have followed the instructions suggested HERE, but still no success.
d3.csv.parse( d3.select("pre#ddata").text(), function (data) {...
Can someone please suggest what I a doing wrong here
Upvotes: 0
Views: 1574
Reputation: 7902
Your jsFiddle is missing some closing curly brackets somewhere (check the console) and you're using d3.csv.parse the wrong way : you should have something like :
data = d3.csv.parse(d3.select("pre#ddata").text(),function(data){
return {
date : data.date,
premise : data.premise,
apc : data.apc
}
});
https://github.com/mbostock/d3/wiki/CSV#parse
Upvotes: 1