d3.js - Transition line/path to depict "live" data D3 -



d3.js - Transition line/path to depict "live" data D3 -

following on previous post:

"live" graph d3.js simulated data.

i pulling info @ 1 min intervals database. json array beingness updated new "live" data, while both x , y axis's updating line/path isn't?

https://gist.github.com/majella/5fc4cd5f41a6ddf2df23

i cannot figure out why - can help?

ps - tried adding data.push() , data.shift() "setinterval" function allow new info - doesn't seem create difference - , axis's beingness condensed , hard read new info added.

you mention axes getting compressed. indicate info continually beingness added in mysql table, when run query, pulling all time values out.

could suggest include line in mysql query pulls out amount info in length of time want display.

for instance, if wanted display 60 minutes of info select lastly hr worth of results appropriate 'where' statement this...

select datetimetaken, reading testsourcesampledata datetimetaken between now()-interval 1 hr , now() grouping datetimetaken

(the query untested)

the other thing might want seek utilize v3 of d3.js (d3.v3.js in line 14 of html file). means think you'll have include error trap in d3.json line so;

d3.json("getdata.php", function(error, data) {

at lines 45 , 131.

give ideas try.

d3.js

Comments

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

r - url in CRAN extension manual -

asp.net - .NET Control.ID property inconsistency -