Search code examples
d3.jsversion

How to check D3 version?


This question is not an exact duplicate, it is a "translation hub" for non-obvious questions:


There is a property like d3.version for "core version"? or some "per module" property or method to check version? (imagining for example something like d3.csv.version)

The API docs show nothing about it.

PS: supposing that it is stable and can be checked for example in embedded D3 like Plotly.d3.


Solution

  • Update (2023-10-19):

    As of d3@>7.0.0, the version number is no longer exposed. The last version that had it was d3@6.7.0.


    Old response:

    You're correct, you can figure out the version using d3.version.

    Just checked using console.log(d3) to see all the methods and properties available, and version was listed.

    Here's a fiddle: https://jsfiddle.net/3e42bxom/2/