score:1

Accepted answer

try changing :

var lineGridLines = d3.svg.line()
    .interpolate('step-after')
    .x(function(d) { return xScaleGridLines(d.x); })
    .y(function(d) { return yScaleGridLines(d.y); });

to :

 var lineGridLines = d3.svg.line()
        .interpolate('step-after')
        .x(function(d) { return xScaleGridLines(d.x) - x.rangeBand()/2; })
        .y(function(d) { return yScaleGridLines(d.y); });

Related Query

More Query from same tag