Created
April 25, 2017 19:35
-
-
Save frchaves/df26327006d1b2f56801487ac59408bb to your computer and use it in GitHub Desktop.
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
global.data = [ | |
{ | |
x: "" , | |
y: "" , | |
'type':'scatter', | |
'mode':'lines+markers', | |
stream: {token: 'thetoken'} | |
} | |
]; | |
var data = [ | |
{ | |
x: msg.x, | |
y: msg.y, | |
'type':'scatter', | |
'mode':'lines+markers', | |
stream: {token: 'thetoken'} | |
} | |
]; | |
var i = 0; | |
global.data.push(x, data[i].y); | |
console.log(global.data); | |
output: | |
[ { x: '', | |
y: '', | |
type: 'scatter', | |
mode: 'lines+markers', | |
stream: { token: 'thetoken' } }, | |
'2017-04-25 20:27:04.426', | |
3.4928, | |
'2017-04-25 20:27:06.147', | |
1.598, | |
'2017-04-25 20:27:07.992', | |
5.8, | |
'2017-04-25 20:27:10.457', | |
5.0345, | |
'2017-04-25 20:27:11.275', | |
3.09275 ] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment