Mike Bostock tweets:
After 12+ months and ~4,878 commits, I am excited to announce the release of D3 4.0! https://github.com/d3/d3/releases/v4.0.0 … #d3js
After looking at the highlights page on Github, I couldn’t in good conscience omit any of it:
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 and Layouts
- 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.
Even More!
- Better default axis appearance.
- Better brush interaction.
- Built-in asynchronous queue for loading files in parallel.
- New low-level d3.ticks API.
…
Don’t complain to me that you are bored over the Fourth of July weekend in the United States.
Downloads: d3.zip, Source code (zip), Source code (tar.gz).