@fbahashwan,
Please take a look at this tutorial on rendering charts from JSON API using AJAX.
If you further face any issues, kindly create a JSFiddle reproducing the issue so that we can look into your code, understand it better and help you out.
__
Priyanka M S
Team CanvasJS