I think this needs to be adjusted when you add an axis to your chart.
Try it (if your graph is called svg):
var bandSize = xScale.rangeBand(); svg.append("svg:g") .attr("transform", "translate(-" + bandSize + "," + h + ")") .call(xAxis) .selectAll("text") .style("text-anchor", "start") .attr("transform", "translate(" + bandSize + ", 0)");
In my experiments, this shifts ticks to the beginning of each strip and keeps the text centered under each strip.
source share