I am working on a D3 bar chart as per the mock-up below:
How do I make the bars to have rando
colors = d3.scale.category20() rects = svg.selectAll('rect') .data(data) .enter() .append("rect") .attr("class","rect") .....#other attributes .attr("fill",function(d,i){return colors(i)})