From 74201025b87bf478a6e8cef7c3b8dca1af2d2562 Mon Sep 17 00:00:00 2001 From: Porter Libby <pelibby16@earlham.edu> Date: Wed, 27 Jul 2022 17:21:56 -0400 Subject: [PATCH] bug fix graph truncation --- package.json | 2 +- public/js/graph.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 58018ac..25e4bf6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "weather_interface", - "version": "1.02.02", + "version": "1.02.03", "description": "Collect data from a Davis Vantage Pro 2, and display and download it through a NodeJS front-end.", "main": "index.js", "scripts": { diff --git a/public/js/graph.js b/public/js/graph.js index 27bee95..edd5ab4 100644 --- a/public/js/graph.js +++ b/public/js/graph.js @@ -20,7 +20,7 @@ function make_graph(arr, depth, offset){ slide_min = Math.min(document.getElementById('slide1').value, document.getElementById('slide2').value); arr = [arr[0]].concat(arr.slice(slide_min, slide_max)); */ - arr = [arr[0]].concat(arr.slice(arr.length - 101)); + arr = [arr[0]].concat(arr.slice(1).slice(arr.length - depth)); let data_sensors = arr.shift(); // titles of columns let datasets = []; // container for data to graph (2d array) -- GitLab