Chapter 4. Tipping the Scales

In this chapter, we will cover:

  • Using continuous scales
  • Using the time scale
  • Using the ordinal scale
  • Interpolating a string
  • Interpolating colors
  • Interpolating compound objects

Introduction

As a data visualization developer, one of the key tasks that you will need to perform over and over is to map values from your data domain to your visual domain; for example, mapping your most recent purchase of a fancy tablet of $453.00 to a 653-px-long bar, and your last night's pub bill of $23.59 to a 34-px-long bar. In a sense, this is what data visualization is all about, mapping data elements to their visual metaphor in an efficient and accurate manner. Because this is an absolutely essential task in data visualization and animation ...

Get Data Visualization with D3 4.x Cookbook - Second Edition 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.