making canvas optional
adding d3 as a dependancy