Move chart generation to a separate file. Default the view to 6 months on page load.