Home  >  Article  >  Web Front-end  >  How about d3js

How about d3js

anonymity
anonymityOriginal
2019-05-29 13:50:552838browse

The full name of D3 is (Data-Driven Documents). As the name suggests, you can know that it is a document driven by data. The name sounds a bit abstract, but to put it simply, it is actually a JavaScript function library. It is mainly used for data visualization.

How about d3js

How popular is D3?

D3 is an open source project written by an engineer at The New York Times. The code of the D3 project is hosted on GitHub (a development management platform that is now the most popular code hosting platform in the world, gathering outstanding engineers from all over the world).

JQuery is famous enough, but it ranks 6th and D3 ranks 5th.

How to evaluate D3.js?

Just think of d3.js as jQuery for svg.

All operations of d3.js are real dom operations, which are completely different from React's vdom.

Of course, d3.js can also calculate node attributes first and then hang the dom tree, but it is not commonly used.

It is not a big deal to operate SVG dom. Any front-end programmer can learn to operate SVG in a short time.

jQuery-style operations are not something advanced today.

What's more, d3's selector, in my opinion, is not the most suitable interaction method for it.

The great thing about d3 is that it has established a complete set of calculation frameworks from data to SVG attributes.

Commonly used Data visualization models, most of which can be found in d3.layout,

The geometric shapes you commonly use are all in d3.svg.

It provides a complete toolkit for programmers who do not understand the SVG attribute calculation formula, allowing you to easily convert data into the SVG attributes you want. Instead of spending energy on learning how to generate a path and the like.

Now it seems that componentization can solve many problems of HTML typesetting, and of course it can also solve the problem of SVG typesetting.

However, d3, as the basis for countless data visualization libraries, is already too big to transform.

But if you combine the mathematical processing module of d3 core with the latest component framework, you can easily make SVG components that are highly reusable and easy to use.

The above is the detailed content of How about d3js. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What is d3jsNext article:What is d3js