Remove dependence on browser globals from the chart controller by passing in the chart SVG element and moving the event listener out of that module.
Remove the unecessary IIFE from the top level JS file.
Docs.
Moved the chart javascript into a folder for better encapsulation of other chart related functions.
Decorate the chart prototype according the chart option 'chartType'