Extracted Rickshaw graph creation into a separate js file