loads graph on page load