Chapter 5. Creating User Interface Elements

In the previous chapter, we learned how to use the drag behavior and SVG elements to create reusable controls and user interface elements. In this chapter, we will learn how to create additional elements to complement our projects. When designing data visualizations, screen real estate is one of the scarcest resources; we need to get the most out of our pixels without cluttering the screen. One of the strategies to solve this problem is to add contextual user interface elements, allowing the user to request any additional information in a quick and nonintrusive way. A tooltip does just that: it displays additional information about an item without cluttering the entire visualization.

If the page has a ...

Get D3.js: Cutting-edge Data Visualization now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.