Be notified of new releases
Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 28 million developers.Sign up
D3 is now modular, composed of many small libraries that you can also use independently. Each library has its own repo and release cycle for faster development. The modular approach also improves the process for custom bundles and plugins.
There are a lot of improvements in 4.0: there were about as many commits in 4.0 as in all prior versions of D3. Some changes make D3 easier to learn and use, such as immutable selections. But there are lots of new features, too! These are covered in detail in the release notes; here are a few highlights.
Colors, Interpolators and Scales
- Colors now have opacity (rgba, hsla, etc.).
- New Cubehelix color space.
- New sequential color scales, including Viridis and cyclical Rainbow.
- New point and band scales replace ordinal.rangeBands and ordinal.rangePoints.
- New basis spline interpolators (e.g., continuous ColorBrewer schemes).
- Shapes (e.g., lines, areas, arcs) can now render to Canvas.
- Fixed cardinal and monotone splines.
- Added parameterized Catmull–Rom and natural splines.
- New deterministic, extensible velocity Verlet force layout.
- New circle-packing layout!
- New extensible treemap layout; improved squarified treemaps; added binary treemaps.
- New d3.stratify for tabular hierarchical data.
- New faster, mutable, non-recursive quadtrees.
- Voronoi diagrams now expose topological information.
Selections, Transitions, Easings and Timers
- Selections and transitions are now immutable, providing a cleaner interface.
- New selection.raise, selection.lower and selection.dispatch methods.
- Time is now frozen in the background, avoiding unintended effort.
- Timers can now be stopped externally.
- Transitions can now interpolate CSS transforms (in addition to SVG transforms).
- You can now cancel transitions using selection.interrupt.
- Easier transition chaining thanks to new d3.active and changed transition.delay.
- Better performance for homogenous transitions (e.g., shared interpolators across elements).
- Better state persistence and enforcement for transitions.
- Fixed elastic and bounce easing.