forked from wezm/wezm.net
Switch to flot for charting
This commit is contained in:
parent
7b644ad56a
commit
dcc9338a23
2 changed files with 4 additions and 10 deletions
|
@ -2,7 +2,8 @@
|
|||
<html>
|
||||
<head>
|
||||
<%= render '_head' %>
|
||||
<script src="/js/dygraph-combined.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/js/jquery.flot.min.js" type="text/javascript" charset="utf-8"></script>
|
||||
<!--[if IE lt 9]><script language="javascript" type="text/javascript" src="/js/excanvas.min.js"></script><![endif]-->
|
||||
<script src="/js/mojo.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/js/weather.js" type="text/javascript" charset="utf-8"></script>
|
||||
</head>
|
||||
|
|
|
@ -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, {});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue