1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-11 18:32:50 +00:00

updated message on sensor page - removed humidity readings if null

This commit is contained in:
2016-03-04 00:34:29 -06:00
parent df35c95224
commit 48de579197
2 changed files with 7 additions and 4 deletions

View File

@@ -114,7 +114,12 @@ function displayChart(chart_id, chart_legend_id, year, month){
data.datasets[0].data.push(json[i].max);
data.datasets[1].data.push(json[i].min);
data.datasets[2].data.push(Math.ceil(json[i].humidity));
//add humidity to chart if it is not null in the database query
if (json[i].humidity != null){
data.datasets[2].data.push(Math.ceil(json[i].humidity));
}
}
// Get context with jQuery - using jQuery's .get() method.