What is the difference between D3.js and D3.min.js files? It seems enough to include only D3.min.js. What is D3.js for then?
Even http://d3js.org/ page suggests to get d3.min.js from internet and include into the body
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js" charset="utf-8"></script>
When I extract downloaded zip from http://d3js.org/ i get both d3.js and d3.min.js
Normal “. js” is usually a file containing code with additional comments which explains what are specific method doing, what variable contains etc. “Min JS” (from “Minified”) is the same code but minified (“squashed”) to keep entire functionality taking minimum amount of space.
js (also known as D3, short for Data-Driven Documents) is a JavaScript library for producing dynamic, interactive data visualizations in web browsers. It makes use of Scalable Vector Graphics (SVG), HTML5, and Cascading Style Sheets (CSS) standards. It is the successor to the earlier Protovis framework.
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.
D3.js is a JavaScript library for manipulating documents based on data. D3 helps you bring data to life using HTML, SVG, and CSS.
The D3.min.js
file is the compressed version of the code. Which means it's smaller and suitable for production - faster loading.
The uncompressed version of the file D3.js
is the version you would use in development stage of your app. You can browse the code easier & most of the IDEs have the "go to the function definition" functionality which is almost impossible if you use the compressed version of the file.
Both files have the same functionality.
This applies to other javascript
libraries out there in the Internet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With