In recent years, visualization has become more and more popular. Many newspapers, magazines, portals, news, and media have made extensive use of visualization technology, making complex data and text very easy to understand. There is a proverb "A picture is worth a thousand dollars." A Thousand Words” is indeed worthy of its name. Various data visualization tools have also developed rapidly, and D3 is one of the best.
#What is D3
#The full name of D3 is (Data-Driven Documents). As the name suggests, you can know that it is a data-driven document. document. 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. If you don’t know what JavaScript is, please learn JavaScript first.
The suffix of JavaScript files is usually .js, so D3 is often called D3.js. D3 provides a variety of simple and easy-to-use functions, which greatly simplifies the difficulty of operating data in JavaScript. Since it is essentially JavaScript, all functions can be implemented using JavaScript, but it can greatly reduce your workload, especially in data visualization. D3 has reduced the complex steps of generating visualizations to a few simple functions. , you only need to enter a few simple data to convert it into a variety of gorgeous graphics. Friends who have basic knowledge of JavaScript will easily understand it.
The best place to learn D3 is: http://d3js.org/, of course it is all in English.
D3 is a JavaScript function library and does not require what is commonly called "installation". It only has one file and can be referenced in HTML. There are two methods:
(1) Download the D3.js file: d3.zip
After decompression, just include the relevant js files in the HTML file.
(2) You can also directly include network links. This method is simpler:
But the network connection must be kept valid when using it, and it cannot be used when the network is disconnected.
The above is the detailed content of What is d3js. For more information, please follow other related articles on the PHP Chinese website!