fixed temperatures hopefully
This commit is contained in:
@@ -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");
|
||||||
|
|||||||
Reference in New Issue
Block a user