Permalink
Browse files

Trying to align the graph

  • Loading branch information...
1 parent 4e7a627 commit 3381b3407881b9c6fc9d15a5b9868229b0f2c0e1 @zbelzer committed Mar 25, 2011
Showing with 8 additions and 3 deletions.
  1. +8 −3 lib/wmr/server/public/app.js
@@ -8,7 +8,8 @@ $(function() {
]
$.each(data, function(index, value) {
- series[value.sensor].data.push([value.time, value.fahrenheit])
+ // series.push([new Date(value.time).getTime(), value.fahrenheit])
+ series[value.sensor].data.push([new Date(value.time).getTime(), value.fahrenheit])
});
console.log(series)
@@ -20,7 +21,7 @@ $(function() {
},
title: {
text: 'Temp'
- },
+ },
plotOptions: {
spline: {
lineWidth: 4,
@@ -43,7 +44,11 @@ $(function() {
}
},
series: series,
- xAxis: { type: 'datetime' }
+ xAxis: {
+ type: 'datetime',
+ tickInterval: 3600 * 1000,
+ showFirstLabel : true,
+ showLastLabel: true }
});
});
});

0 comments on commit 3381b34

Please sign in to comment.