Move javascript code from device's show view

Javascript code to show graph is moved to graphupdater.js file on
assets.