-
Fan Status
+
+
+
+
Fan Status
+
+
No data available...
+
-
No data available...
-
-
-
-
Bulb Status
+
+
+
+
Bulb Status
+
+
No data available...
+
-
No data available...
-
diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/units/analytics/public/js/graph_util.js b/modules/distribution/src/repository/jaggeryapps/iotserver/units/analytics/public/js/graph_util.js
index c159c1ba..c49d5843 100644
--- a/modules/distribution/src/repository/jaggeryapps/iotserver/units/analytics/public/js/graph_util.js
+++ b/modules/distribution/src/repository/jaggeryapps/iotserver/units/analytics/public/js/graph_util.js
@@ -148,22 +148,52 @@ function updateGraphs(stats) {
console.log(stats);
var temperatureData = stats['temperatureData'];
- updateTemperatureGraph(convertStatsToGraphData(temperatureData));
+ if (typeof temperatureData != 'undefined'){
+ $('#div-temperatureData').html("").html("
");
+ updateTemperatureGraph(convertStatsToGraphData(temperatureData));
+ }else{
+ $('#div-temperatureData').html("");
+ }
var lightData = stats['lightData'];
- updateLightGraph(convertStatsToGraphData(lightData));
+ if (typeof lightData != 'undefined'){
+ $('#div-lightData').html("").html("
");
+ updateLightGraph(convertStatsToGraphData(lightData));
+ }else{
+ $('#div-lightData').html("");
+ }
var motionData = stats['motionData'];
- updateMotionGraph(convertStatsToGraphData(motionData));
+ if (typeof motionData != 'undefined'){
+ $('#div-motionData').html("").html("
");
+ updateMotionGraph(convertStatsToGraphData(motionData));
+ }else{
+ $('#div-motionData').html("");
+ }
var sonarData = stats['sonarData'];
- updateSonarGraph(convertStatsToGraphData(sonarData));
+ if (typeof sonarData != 'undefined'){
+ $('#div-sonarData').html("").html("
");
+ updateSonarGraph(convertStatsToGraphData(sonarData));
+ }else{
+ $('#div-sonarData').html("");
+ }
var fanData = stats['fanData'];
- updateFanGraph(convertStateStatsToGraphData(fanData));
+ if (typeof fanData != 'undefined'){
+ $('#div-fanData').html("").html("
");
+ updateFanGraph(convertStateStatsToGraphData(fanData));
+ }else{
+ $('#div-fanData').html("");
+ }
var bulbData = stats['bulbData'];
- updateBulbGraph(convertStateStatsToGraphData(bulbData));
+ if (typeof bulbData != 'undefined'){
+ $('#div-bulbData').html("").html("
");
+ updateBulbGraph(convertStateStatsToGraphData(bulbData));
+ }else{
+ $('#div-bulbData').html("");
+ }
scaleGraphs();
}