From b1e4554a85d7356134520e42172be82b33aecab3 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Wed, 5 Mar 2014 16:38:10 +0100 Subject: [PATCH] fixed charting bug --- js/apps/system/aardvark/frontend/js/views/dashboardView.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/apps/system/aardvark/frontend/js/views/dashboardView.js b/js/apps/system/aardvark/frontend/js/views/dashboardView.js index cde3c1a361..851bef0275 100644 --- a/js/apps/system/aardvark/frontend/js/views/dashboardView.js +++ b/js/apps/system/aardvark/frontend/js/views/dashboardView.js @@ -261,10 +261,13 @@ Object.keys(self.dygraphConfig.combinedCharts).forEach(function (cc) { var part = cc.split("_"); var val = [new Date(time)]; + self.dygraphConfig.combinedCharts[cc].sort().forEach(function(attrib) { if (self.LastValues[attrib]) { val.push(self.LastValues[attrib].graphVal); - } else if (entry[part[0]] && entry[part[0]][attrib]) { + } + else if (typeof entry[part[0]] === 'object' && + entry[part[0]].hasOwnProperty(attrib)) { val.push(entry[part[0]][attrib]); } }); @@ -555,7 +558,6 @@ renderDistributionPlaceholder: function () { var self = this; - console.log(this); _.each(this.dygraphConfig.chartTypeExceptions.distribution, function(k, v) { $(self.distributionChartDiv).append(self.distributionTemplate.render({ elementId: v + "Distribution"