Create a Color Scale with D3's scaleOrdinal

InstructorAndy Van Slaars

Share this video with your friends

Send Tweet

In this lesson, we'll clean up some of our placeholder elements. We'll then look at D3's ordinal scale to create a color scale that maps our regions to colors. We'll apply the colors based on region to our data points via the SVG g(group) element to apply the color to both our bars and their corresponding inline labels.