working graph on page load