Add data to chart in real-time

The complete code of the above sample is given below: