D3: .scaleBand, .rangeRound, .padding: Ordinal Scale with Range Bands including Padding
Comparing the two gists below:
- v4’s
.scaleBand()
replaced v3's.scale.ordinal()
. - v4’s
.rangeRound()
and.padding()
replaced v3’srangeRoundBands()
. .padding()
is a convenience method which sets both paddingInner and paddingOuter values to the same value, see Fig.1.- v4’s
console.log(bands.bandwidth())
replaced v3’sconsole.log(bands.rangeband())
.
Forked v4 script above. Original v3 script below.
D3.js 3.5.17 seems to have a similar existence to Python 2.7.13. Maintained to avoid alienating v3 users.