The significant role of D3 library
It can bring data to life with SVG, Canvas and HTML.
The elements and perspectives in D3 world:
- start
- compat
- arrays
- behavior
- color
- core
- dsv
- event
- format
- geo
- geom
- interpolate
- layout
- math
- scale
- selection
- svg
- time
- transition
- xhr
- end;
Code Anatomy
- create d3 object in the start.js file and assign the version property to the d3 object;
- detect the runtime environment(browser or nodejs) and add the d3 object to the specific environment’s root global object in the end.js file;
- In the compat directory, it adds compatible functions for array, date and style objects and operations.
- In the core directory, It mainly solves the issues of how to change class constructor’s prototype and rebind the function from source object to target object.