-
Book Overview & Buying
-
Table Of Contents
Learn D3.js - Second Edition
By :
Quantitative data visualizations often use dots, lines, and shapes to represent values within the context of a domain. Axes provide this context by using lines, tick marks, and labels. Each axis provides context for a single dimension. The Cartesian coordinate system, common in charts, uses two perpendicular axes for a two-dimensional space. Other visualizations may use three or more axes.
Axes are essential in D3 visualizations that plot data points on a line or plane, such as scatter plots, line charts, and bar charts. The d3-axis module provides them as SVG components that can be easily added to an existing visualization, bound to existing data scales, and updated automatically with smooth transitions when the data changes.
In this chapter, you will learn how to create axes for your charts, configure their position, ticks, paddings, and other visual aspects, bind them to a scale, and apply them to selections. Although D3 provides one-dimensional axes, it’s easy...