I am trying to load data from a CSV file to a list and then to use that list as data to render the D3 chart. The original chart just has an array with objects and passes these as data to the graph.
This is what I currently have:
var links=[];
d3.csv("C:\Users\user\Desktop\tv.csv", function(data){
links=data;
doThisWithData(links);
});
The doThisWithData()
function appends the data to the chart. I bounded a few variables who did that independently with a var links=[];
and now I am substituting the links variable for a CSV originated links array instead.
This doesn't work for me. Anyone sees any flaws?