fixed temperatures hopefully

This commit is contained in:
Senad Uka
2017-05-24 19:12:57 +02:00
parent 947a9c6a43
commit aba33781ef

View File

@@ -20,11 +20,11 @@ Template.log.events({
} }
}); });
var tempHolder = {};
var createChart = function() { var createChart = function() {
var self = this; var self = tempHolder;
self.labels = []; self.labels = [];
self.temperatures = []; self.temperatures = [];
Tracker.autorun(function() { Tracker.autorun(function() {
@@ -41,6 +41,8 @@ var createChart = function() {
}); });
}); });
if(self.temperatures.length <= 0) { return; } /// there are no temperatures
// Get the context of the canvas element we want to select // Get the context of the canvas element we want to select
var chartCanvas = document.getElementById("temperatureChart"); var chartCanvas = document.getElementById("temperatureChart");