1 min read

D3.js version 5.0 released. D3.js is a JavaScript library for creating dynamic, interactive data visualizations in web browsers.

The new version 5.0 includes only a few non-backwards-compatible changes. D3.js now uses Promises, instead of asynchronous callbacks to load data. Promises simplify the structure of asynchronous code, especially in modern browsers that support async and await.

Let us see some of the changes in this version:

  • The d3-request module has been replaced by d3-fetch, due to the adoption of Promises.
  • D3 5.0 also deprecates and removes the d3-queue module.
  • One can use Promise.all to run a batch of asynchronous tasks in parallel, or a helper library such as p-queue to control concurrency.
  • D3 now includes d3-scale-chromatic, which implements excellent schemes from ColorBrewer, including categorical, diverging, sequential single-hue and sequential multi-hue schemes.
  • The version 5.0 also provides implementations of marching squares and density estimation via d3-contour.
  • There are two new d3-selection methods: selection.clone for inserting clones of the selected nodes, and d3.create for creating detached elements.
  • D3’s package.json no longer pins exact versions of the dependent D3 modules. This fixes an issue with duplicate installs of D3 modules.

To read more about the changes in detail, visit the GitHub repo.

A Data science fanatic. Loves to be updated with the tech happenings around the globe. Loves singing and composing songs. Believes in putting the art in smart.

LEAVE A REPLY

Please enter your comment!
Please enter your name here