From the course: D3.js Essential Training
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
Using color scales - D3.js Tutorial
From the course: D3.js Essential Training
Using color scales
- [Narrator] Imagine this map without color. We often use color to express data. Now we're going to explore D3's vast offering of color scales, including predefined arrays of color. Here the data are randomly generated. You select whether the data are sequential, diverging or qualitative, and you can click this info button to see what each means. And the site suggests different color palettes for you depending on which of the three selections you've made. Now this map is incredibly influential because Cynthia Brewer and colleagues came up with the map and the coloring, and it is what lies behind D3's selection of color scales. Okay, so it's worth investing some time in understanding this site. Let's just go through it quickly. Sequential color schemes are suitable when the data can be ordered and where darker colors represent higher values or values of interest. So typically low values are of less interest and the high values are of more interest. So we are drawing the user's…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Introducing scales3m 40s
-
(Locked)
Position elements with a linear scale5m 51s
-
(Locked)
Creating a linear axis6m 8s
-
(Locked)
Positioning and formatting our axis7m 29s
-
(Locked)
Creating a time scale7m 33s
-
(Locked)
Creating a time series axis6m 10s
-
(Locked)
Creating an ordinal scale and axis11m 16s
-
(Locked)
Using color scales13m 36s
-
(Locked)
Challenge: Add Fahrenheit scale1m 18s
-
(Locked)
Solution: Add Fahrenheit scale3m 6s
-
(Locked)
-
-
-
-
-