D3 code for stacked bar chart