Added functionality for making charts with d3js