diff --git a/kiln/static/js/temp_graph.js b/kiln/static/js/temp_graph.js index 20a792b..2780687 100644 --- a/kiln/static/js/temp_graph.js +++ b/kiln/static/js/temp_graph.js @@ -150,7 +150,31 @@ var tempgraph = (function(module) { this.y.domain(extent); this.draw(); } + module.Graph.prototype.resample = function(data) { + var npoints = 1000; + var idxs = [] + var within = []; + var within_idx = []; + for (var i=0; i=this.xlim()[0] && data[i].x<=this.xlim()[1]) { + within.push(data[i]); + within_idx.push(i); + } + } + if (within.length>npoints) { + md = Math.floor(within.length/npoints); + var fin = [] + for (var i=0; i