From dcc9338a237d77097ece682fbee14bd9d319cfc9 Mon Sep 17 00:00:00 2001 From: Wesley Moore Date: Tue, 21 Sep 2010 17:36:40 +1000 Subject: [PATCH] Switch to flot for charting --- layouts/weather.html | 3 ++- output/js/weather.js | 11 ++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/layouts/weather.html b/layouts/weather.html index 7c2b8d9..5c41927 100644 --- a/layouts/weather.html +++ b/layouts/weather.html @@ -2,7 +2,8 @@ <%= render '_head' %> - + + diff --git a/output/js/weather.js b/output/js/weather.js index 09fd52a..635b1b8 100644 --- a/output/js/weather.js +++ b/output/js/weather.js @@ -16,19 +16,12 @@ jQuery(function() { // Populate the current conditions var current_div = render_current(data.current); - // $(current_div).replace('.loading'); $('.loading').replaceWith(current_div) + // Populate the charts $('.temperature.chart').each(function() { var self = this; - var g = new Dygraph( - self, - data.history, - { - labels: ['Date', 'Indoor Temperature', 'Outdoor Temperature'], - rollPeriod: 3, - } - ); + jQuery.plot(self, data.history, {}); }); }); });