Created
January 31, 2020 09:14
-
-
Save chirag773/0f97418bb99463c583cabf2760fc0365 to your computer and use it in GitHub Desktop.
LGEyyY
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="plotDiv"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var plotDiv = document.getElementById('plotDiv'); | |
var data = [{ | |
x: [ new Date().getTime() / 1000 ], | |
y: [0] | |
}]; | |
Plotly.plot(plotDiv, data, { title: 'Random Over Time'}); | |
setInterval(function(){ | |
var update = { | |
x: [[ new Date().getTime() / 1000 ]], | |
y: [[ Math.random() ]] | |
}; | |
Plotly.extendTraces(plotDiv, update, [0], 10); | |
}, 1000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment