Correct d3barchart implementation