on page load js function for loading all time charts