score:0

Accepted answer

You should not use a band scale here: band scales have associated bandwidths.

Instead on that, use a point scale:

var x = d3.scalePoint()
   .rangeRound([0, width]);

More Query from same tag