0.1.0 • Published 10 years ago

flot-stream v0.1.0

Weekly downloads
3
License
-
Repository
github
Last release
10 years ago

flot-stream

Stream to a FlotChart.

Installation

npm install flot-stream

Usage

var FlotStream = require('flot-stream');

var plot = $.plot('#placeholder', [ ], {
  series: {
    shadowSize: 0
  },
  yaxis: {
    min: 0,
    max: 100
  },
  xaxis: {
    min: 0,
    max: 100,
    show: false
  }
});

var stream = new FlotStream({
  plot: plot,
  points: 100
});

setInterval(function () {
  stream.write(Math.random() * 100);
}, 100);