Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

make graphs smoother

  • Loading branch information...
commit 9b4aca91ea21017f7e363e7859eab4f09e3ff673 1 parent 530a45a
@shapeshed authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  server.js
  2. +1 −1  views/layout.jade
View
2  server.js
@@ -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
2  views/layout.jade
@@ -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 + '!');
Please sign in to comment.
Something went wrong with that request. Please try again.