use d3.range instead of homebrew range, fix stack overflow in large input

This commit is contained in:
Ruiyang Wang 2017-11-23 12:26:33 +08:00
parent 8a37519e61
commit 5c0538b5e3

View File

@ -192,7 +192,7 @@ function processCSV(csv, filename) {
}
} /* Use sequence for xAxis */
} else {
xValues = Array.apply(null, Array(nlines)).map(function (_, i) {return i;});
xValues = d3.range(nlines);
graphs.xAxis = function (xa) {
xa.axisLabel('').tickFormat(function(d) {
return d3.format('d')(d);