Awakening
Awakening

Reputation: 3795

Difference between d3.js and d3.v3.js

What is the difference between d3.js and d3.v3.js? I didn't find any declaration in office website, but it seems the one downloaded from github repository is d3.js/d3.min.js, but the office CDN is d3.v3.js? Are they the same?

Upvotes: 3

Views: 3075

Answers (3)

jibin mathew
jibin mathew

Reputation: 752

D3.js has many versions. d3.v3.js is 3rd version or 3rd update of d3.js, while d3.v5.js is the latest version which is the 5th version or 5th update of d3.js. They are not all the same, I have used both d3.v3.js and d3.v4.js, there is some syntax difference between the two. The code which works with d3.v4 might not work with d3.v3 because of the syntax differences.

Upvotes: 1

Union find
Union find

Reputation: 8150

They may be or may not be. Most likely, they are not.

When you open the d3.js/d3.v3.js files, you should see something like:

d3 = function() {
  var d3 = {
    version: "3.3.0"
  };

Look to see that the versions are the same/different. That will tell you.

Upvotes: 2

Goodword
Goodword

Reputation: 1645

Yes, they are the same. Well sortof--one of them will work in your project and one of them won't because of the url you use when you include the file. But the packages from github and cdn are the same.

Upvotes: -2

Related Questions