I\'m making a bar chart with the following code:
svg.selectAll(\".bar\") .data(data) .enter().append(\"rect\") .attr(\"class\", \"bar\") .attr(\"
I think the attribute("class", bar) is not required and you can use rangeBand() to calculate width and check your Yaxis scale takes value [height,0] and rest of the code looks fine.