D3.js: Cutting-edge Data Visualization
by Ændrew H. Rininsland, Michael Heydt, Pablo Navarro Castillo
Summary
In this chapter, we used the drag behavior and the reusable chart pattern to create a slider control. This control can be used to allow users to select values within a range. We used the slider component to create a color picker for the Lab color space. In the implementation of the color picker, we didn't need to know about the internals of the slider; we only used the slider's public interface. The composition between reusable components allows us to create rich components without having to handle the details of their internal elements.
In the next chapter, we will learn how to create tooltips for our charts and how to implement more advanced user interface components. We will also create an area chart that allows us to measure variations ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access