When we upgrade d3.js from v3 to v4 our codebase can break. So I've decided to share some points that may be useful in upgrade.
1. Useful differences between updage from D3.js v3 to D3.js v4
.scale.ordinal() is replaced with v4
.rangeRoundBands() is replaced with v4
.bands.rangeband() is replaced with v4
2. D3.js v4 documentation:
Constructs a new band scale with the specified domain and range, no padding, no rounding and center alignment. If domain is not specified, it defaults to the empty domain. If range is not specified, it defaults to the unit range [0, 1].
band .range(range) .round(true);
Rounding is sometimes useful for avoiding antialiasing artifacts, though also consider the shape-rendering “crispEdges” styles.
Returns the width of each band.