Chapter 11Introducing D3

D3 is a JavaScript library for general purpose visualization. D3 possesses a powerful selection model for declaratively describing how data should be mapped to the visual elements. It comes bundled with a vast variety of helper functions that can be leveraged when building visualizations and is easily extensible to support custom functionality.

Unlike some other visualization libraries, D3 does not offer any prepackaged “standard” visualizations (bar chart, pie chart, and so on), although you can create your own. If you are only interested in standard quick visualizations then you should check out some of the libraries written on top of D3, such as NVD3 (http://nvd3.org/) and C3.js (http://c3js.org/).

On the surface, D3 appears to be similar to jQuery with regard to selecting and manipulating existing elements on the page. D3 adds a mechanism for adding or removing elements to ...

Get JavaScript and jQuery for Data Analysis and Visualization now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.