From 5c0538b5e3e865528c94ce3e0dd9621e0ab9e4b8 Mon Sep 17 00:00:00 2001 From: Ruiyang Wang Date: Thu, 23 Nov 2017 12:26:33 +0800 Subject: [PATCH] use d3.range instead of homebrew range, fix stack overflow in large input --- js/dashboard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/dashboard.js b/js/dashboard.js index 5817766..c59640f 100644 --- a/js/dashboard.js +++ b/js/dashboard.js @@ -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);