Forum Discussion
_anomDiebolt_
11 years agoQrew Elite
The text file has no headings probably because you sliced them off with these lines of code:
var lines = reader.result.split('\n');
lines.splice(0,0);
var newtext = lines.join('\n');
var dsv = d3.dsv(";", "text/plain");
var data = dsv.parse(newtext);
My original example had an extra header row which I sliced off and you used the same code. Try this:
var dsv = d3.dsv(";", "text/plain");
var data = dsv.parse(reader.result);
var lines = reader.result.split('\n');
lines.splice(0,0);
var newtext = lines.join('\n');
var dsv = d3.dsv(";", "text/plain");
var data = dsv.parse(newtext);
My original example had an extra header row which I sliced off and you used the same code. Try this:
var dsv = d3.dsv(";", "text/plain");
var data = dsv.parse(reader.result);