-
Book Overview & Buying
-
Table Of Contents
Learn D3.js - Second Edition
By :
Classic chart types are created in D3 by generating SVG or Canvas with the d3-shape module: а complete library for drawing geometric shapes commonly used in data visualizations. This is the module you need to create line charts, area charts, pie/donut charts, and radial charts.
D3 provides eight shape generators. They return functions that either generate SVG strings, which can be bound to graphical elements in your page, or run Canvas commands that can render the shapes in an HTML Canvas context, based on the data you provide. These generators are also used to draw preconfigured symbols and smooth spline curves for hierarchical linked structures.
This chapter will cover the shape generator functions used to generate lines, areas, and reusable symbols, and demonstrate how you can use them to create data visualizations in Cartesian and radial layouts. As in previous chapters, step-by-step online tutorials are provided showing how to create a...