Hi! The way to update the graph is to get the updated JSON array from php. The example code generates the x and y values whereas mine is retrieved from php.
Take a look at my code, especially the updating function. It doesn’t work and I dont think its the right way to write a javascript code. Not sure if javascript works the same as python, c, c++, etc.