Making my ajax non async to avoid loading the graph before the data is ready.