Update chart using API methods

The complete code of the above sample of Weather report is given below: