prevent mult ajax requests

also added check to stop chart script from running if it's not needed.
#137
loading gif