I\'m studying d3.js by working through the examples on d3.js.org
I\'m starting with \"area chart\" at http://bl.ocks.org/3883195
I tried typing it in myself so I
This related to the version of the D3 library; currently it is transitioning from v2 to v3: https://github.com/mbostock/d3/wiki/Release-Notes
The example you are working from has already been modified for v3, but you are still loading the v2 library.
For d3.tsv the difference between the two version is related to the callback signature:
v2:
d3.tsv("data.tsv", function(data) {
data.forEach(function(d) {
d.date = parseDate(d.date);
d.close = +d.close;
});
v3:
d3.tsv("data.tsv", function(error, data) {
data.forEach(function(d) {
d.date = parseDate(d.date);
d.close = +d.close;
});
That means that in your case the actual data got stored in the error argument.