Hope this helps I managed with it as i wanted, It can be helpful for someone, and if there is better solution for this please do suggest.
Google setOnLoadCallback and Ajax
By : JPalo
Date : March 29 2020, 07:55 AM
seems to work fine The data is undefined with the getData() function. The code you have currently posted is incomplete. Looking at your fiddle there is a line between getData and drawChart functions: getData(); that immediately calls your getData function before the ajax call has been completed. Remove this line and it should work.