Working d3 barcharts