From a9e25632046cb7dd40f21f102fc3e2809cc53518 Mon Sep 17 00:00:00 2001 From: JayWll Date: Sat, 25 Apr 2020 15:29:37 -0600 Subject: [PATCH] Changing UI moisture reading to a percentage --- nodeapp/views/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nodeapp/views/index.html b/nodeapp/views/index.html index a874895..3ce3d31 100644 --- a/nodeapp/views/index.html +++ b/nodeapp/views/index.html @@ -78,7 +78,7 @@ legend: {display: false}, scales: { xAxes: [{type: 'time', time: {unit: 'day', min: fromdate, max: todate}, scaleLabel: {display: true, labelString: 'Date', fontColor: '#999999'}, gridLines: {color: '#CCCCCC'}, ticks: {fontColor: '#666666'}}], - yAxes: [{gridLines: {color: '#CCCCCC'}, ticks: {beginAtZero: true, max: 1200, fontColor: '#666666'}}] + yAxes: [{gridLines: {color: '#CCCCCC'}, ticks: {beginAtZero: true, max: 100, fontColor: '#666666'}}] }, maintainAspectRatio: false } @@ -113,7 +113,7 @@ $.getJSON('/getdata?from=' + from.toISOString() + '&to=' + to.toISOString(), function(j) { $(j).each(function() { this.x = new Date(this.timestamp); - this.y = this.reading; + this.y = this.reading / 1024 * 100; delete this.timestamp; delete this.reading; });