How to set padding on continuous scales (eg scaleLinear) in d3.js v4?
<p>I'm trying to set bar padding in my histogram in much the same way you would if you had an ordinal scale: </p>

<pre><code>x = d3.scaleLinear()
    .domain([fist, last])
    .rangeRound([bottom, top])
    .padding(someFractionBetweenZeroAndOne)
</code></pre>

<p>Nope. That doesn't work. So then I head to the <a href="https://github.com/d3/d3-scale/blob/master/README.md#continuous-scales" rel="nofollow">API documentation</a> there's no <code>.padding</code> method on continuous scales!</p>

<p>Well, I <em>could</em> calculate my bar widths manually, but is there really no integrated <code>padding</code> solution available for continuous scales?</p>