graph ajax set up