view graph by ajax