From 0198ae877875da6ac1a1503fb74f41fbe33e4497 Mon Sep 17 00:00:00 2001 From: Helene Moorman Date: Sun, 22 Feb 2015 20:37:24 -0800 Subject: [PATCH] don't resample if total number of points is below threshold --- kiln/static/js/temp_graph.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/kiln/static/js/temp_graph.js b/kiln/static/js/temp_graph.js index 2780687..d87c820 100644 --- a/kiln/static/js/temp_graph.js +++ b/kiln/static/js/temp_graph.js @@ -152,6 +152,8 @@ var tempgraph = (function(module) { } module.Graph.prototype.resample = function(data) { var npoints = 1000; + if (data.length<=npoints) + return data; var idxs = [] var within = []; var within_idx = []; @@ -161,17 +163,15 @@ var tempgraph = (function(module) { within_idx.push(i); } } - if (within.length>npoints) { - md = Math.floor(within.length/npoints); - var fin = [] - for (var i=0; i