Self updating chart using Rest API

The complete code of the above sample is given below: