Permalink
Browse files

make graphs smoother

  • Loading branch information...
1 parent 530a45a commit 9b4aca91ea21017f7e363e7859eab4f09e3ff673 @shapeshed committed Jun 29, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 server.js
  2. +1 −1 views/layout.jade
View
@@ -36,7 +36,7 @@ io.sockets.on('connection', function (socket) {
setInterval(function() {
io.sockets.emit('count', { number: count });
- }, 2000);
+ }, 1000);
socket.on('disconnect', function () {
count--
View
@@ -24,9 +24,9 @@ html
});
// Data
var line1 = new TimeSeries();
+ smoothie.streamTo(document.getElementById("mycanvas"), 1000 /*delay*/);
smoothie.addTimeSeries(line1,
{ strokeStyle:'rgb(0, 255, 0)', lineWidth:5 });
- smoothie.streamTo(document.getElementById("mycanvas"), 1000 /*delay*/);
socket.on('count', function (data) {
line1.append(new Date().getTime(), data.number);
$('span').text(data.number + '!');

0 comments on commit 9b4aca9

Please sign in to comment.