score:0

The trick was to replace

d3.scale.ordinal()
            .rangeRoundBands([0, size], 0.5);

with

d3.scale.ordinal()
            .rangeBands([0, size], 0.5);

because using rangeRoundBand rounding apparently introduces additional outer padding which is, on average, proportional to the length of the domain. This is the reason why in case of more than 50 bars I was able to see more space at the beginning and the end.


Related Query