Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is D3js v5 backwards compatible with v4?

I used D3js v3 for a class last year and wanted to update my code to v4, but found that v4 was not backwards compatible with v3 and to refactor the code would take too much work for a chart that was already working. Now I am looking to start reading the book Interactive Data Visualizations for the Web (2nd Edition), but the book was published in 2017 using V4. I have read the CHANGES.md file on GitHub, and it sounds like V5 is (for the most part) backward compatible with V4, with only a few minor changes.

Before I get started working with this new book, I wanted to get some more information from people working with D3js about the changes from V4 and V5. I am also curious if it is recommended that I work with the most recent version of D3js (V5.6.0), or work with the books version (V4.5.0)?

like image 559
Joshua Paul Barnard Avatar asked Aug 23 '18 15:08

Joshua Paul Barnard


People also ask

Is d3js still relevant?

The JavaScript ecosystem has completely changed during this time, in terms of libraries, best practices and even language features. Nevertheless, D3 is still here. And it's more popular than ever.

What does D3 JS stand for?

D3. js (data-driven documents) is an open source JavaScript library that allows users to apply prebuilt data visualizations to their data. The code creates interactive graphics and data visualizations in common Web standards like HTML, CSS and SVG.

Is d3js open source?

js, or D3, stands for data-driven documents. It is an open-source JavaScript library that creates interactive data visualizations in a web browser using SVG, HTML, and CSS.


1 Answers

As the previous D3 versions are not supported, it seems better to stick with V5 because that's what you should use in production for new projects. Few braking changes were introduced but they are not significant as you've noted so just keep it in mind when you come across d3.queue, d3.request, d3.schemeCategory20* or file data loading.

like image 55
Ankor Avatar answered Oct 26 '22 20:10

Ankor