mod. refactor chart.js to expose a chart class and factory. This will make it easier to add new elements to the chart.