The upper range value should be rounded down.
mbostock opened this issue · comments
Mike Bostock commented
Currently I say:
range0 = range[0] + 0.5,
range1 = range[range.length - 1] + 0.5,
But wouldn’t this be better?
range0 = range[0] + 0.5,
range1 = range[range.length - 1] - 0.5,
Mike Bostock commented
This is a bad idea because it makes the upper corner of the path domain inconsistent with the last tick, which is often coincident with the end of the path domain. Better is to offset the scale range by one pixel:
x.range([0, width - 1]);