I want to plot a picture with D3. The data is from text file like this: a.txt:
1 200
2 300
3 220
I try to read the file in this way
d3.text("850191387_full_info.txt",function(error,data)
{
if(error)
return console.error(error);
d3.select("body")
.append("p")
.text(data);
});
But it can only appear the whole data in web page. How can I plot a simple line chart with this txt file? the first column as x variable, and the second column as y variable