D3 barchart that automatically scales for input - first commit