D3.js First Knowledge

Source: Internet
Author: User

D3.js A simple primer

D3 is a JavaScript framework: The main purpose is to visualize data,

So he developed it under JavaScript, and currently has the D3.js 3.0 and D3.js 4.0 versions.

The use of the method is very simple, 1. Download d3.js to the website and add it in HTML.

2. Or link directly to the official website on the line.

It can only be used currently on the IE 8 version.

1. A few simple operations

D3.select//SELECT element

D3.selectall//Select all elements

D3.attr//Modify Properties

D3.append//Add Element

d3.classed//Add CSS Class

D3.style//Add a style to the specified element

D3.text//Get or set text messages

d3.html//used to modify HTML within an element

2. Introduction of Knowledge

Svg

3. Simple graphics

4. Scale

5. Axis

6. Add some special effects

7. Simple Chart Processing bar chart

8. Simple Chart Processing Line chart

9. Area chart of Simple chart processing

10. Simple Chart Processing pie chart

11. Come on some interaction

Simple bar Chart steps:

1. Define a canvas

2. Defining data and scale bars

3. Define a axis

4. Add a rectangle

5. Add text messages

6. Adding axis elements

D3.js First Knowledge

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.