Trusted answers to developer questions

What is D3.js?

Get Started With Data Science

Learn the fundamentals of Data Science with this free course. Future-proof your career by adding Data Science skills to your toolkit — or prepare to land a job in AI, Machine Learning, or Data Analysis.

D3.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.

D3 allows you to bind arbitrary data to a Document Object Model (DOM), and then apply data-driven transformations to the document. For example, you can use D3 to generate an HTML table from an array of numbers or you can use the same data to create an interactive SVG bar chart with smooth transitions and interactions.

svg viewer

Features

Uses web standards: Since D3 exploits modern web standards to create data visualizations, the learning curve is very low.

DOM manipulation: D3 allows manipulates the DOM based on your data (similar to how React works) and, since it is a JavaScript library, it can be used with any JS framework.

Data driven elements: D3 dynamically generates elements from your data and applies styles to them. An element can be a table, graph, or any other HTML element.

Custom visualizations: Since D3 works with web standards, it gives you complete control over your visualization features.

Interaction, transition, and animation: D3 provides support for smooth animations with functions like duration(), delay(), and ease(). The transition() function allows D3 to logically interpolate the values in your data and find the intermittent states.

Open-source: Since D3 is open-source, you can edit the source code and add your own features.

More information about D3 can be found on their official website.

RELATED TAGS

d3.js
javascript
library
visualization
Copyright ©2024 Educative, Inc. All rights reserved
Did you find this helpful?