Skip to content

Instantly share code, notes, and snippets.

@mathisonian
Created August 14, 2016 23:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mathisonian/9b8f12d6321a7e4fcf21a164631dcf1a to your computer and use it in GitHub Desktop.
Save mathisonian/9b8f12d6321a7e4fcf21a164631dcf1a to your computer and use it in GitHub Desktop.
run in node
var Lightning = require('lightning.js');
var lightning = new Lightning();
lightning.lineStreaming([1,1,2,3,5,8,13,21])
.then(function(viz) {
viz.open()
setInterval(function() {
viz.appendData([Math.random()]); // appends to existing data
// or
// viz.updateData([Math.random()]); // replaces existing data
}, 1000);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment