Thanks for the help.
I figured it out.
I was pushing data into the datapoints everytime.
But it was going over the x- axis length. thus i was getting error for those points
Now I am popping out the datapoint before pushing into them everytime I am making a new chart.
https://jsfiddle.net/AarushiM/yLLbnzz1/23/ heres the correctly working version.
the way i wanted it to work.
Thankyou CanvasJS. You guys have amazing charts.
Have a nice day.
Regards,
Aarushi