diff --git a/plotter/static/js/jroplots.js b/plotter/static/js/jroplots.js index 542216e..7bdeba4 100644 --- a/plotter/static/js/jroplots.js +++ b/plotter/static/js/jroplots.js @@ -33,10 +33,15 @@ class PcolorBuffer { /* This function is used to plot all the data that have the DB and just is used when is loaded or reloaded*/ setup(data) { this.last = data.time.slice(-1); + var diffArr = []; + for(var i=0; i 1.5 * parseFloat(obj.metadata.interval)) { + while (Math.abs(parseFloat(obj.time[0]) - this.last) > 1.5 * parseFloat(this.interval)) { cnt += 1; - this.last += obj.metadata.interval; + this.last += this.interval; var newt = new Date((this.last) * 1000); // This condition is used to change from UTC to LT if (obj.metadata.localtime == true){ @@ -421,13 +426,18 @@ class ScatterBuffer { /* This function is used to plot all the data that have the DB and just is used when is loaded or reloaded*/ setup(data) { - //this.data = data; var traces = []; this.last = data.time.slice(-1); + var diffArr = []; + for(var i=0; i 1.5 * parseFloat(obj.metadata.interval)) { + while (Math.abs(parseFloat(obj.time[0]) - this.last ) > 1.5 * parseFloat(this.interval)) { cnt += 1; - this.last += obj.metadata.interval; + this.last += this.interval; var newt = new Date((this.last) * 1000); // This condition is used to change from UTC to LT if (obj.metadata.localtime == true){