To avoid distortion, the best approach is not to apply the transform
to the elements, but to redraw them using the modified scale:
svg.selectAll("rect.timebar").attr('x', function (d) {
return x(d.start);
})
.attr('width', function (d) {
return x(d.end) - x(d.start);
});
svg.selectAll(".thetext").attr('x', function (d) {
return x(d.start);
});
Complete example here.