From f7f99e0be19fcfc10990cd2c14ee9bb21495dded Mon Sep 17 00:00:00 2001 From: Huu Nghia NGUYEN Date: Fri, 22 Jan 2016 16:31:55 +0100 Subject: [PATCH] gh-1554 firefox takes much time to concat a big array --- c3.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/c3.js b/c3.js index 3c7b540..7d400cc 100644 --- a/c3.js +++ b/c3.js @@ -1993,12 +1993,13 @@ return Math.sqrt(Math.pow(x - pos[xIndex], 2) + Math.pow(y - pos[yIndex], 2)); }; c3_chart_internal_fn.convertValuesToStep = function (values) { - var converted = [].concat(values), i; if (!this.isCategorized()) { return values; } - + + var converted = values.slice(0), i; + for (i = values.length + 1; 0 < i; i--) { converted[i] = converted[i - 1]; }