14
Events and Interactivity
D3 relies on native JavaScript events for most of its interactive operations and offers a set of tools that assist with event management, many of which have already been used in previous chapters. This chapter reviews these tools, covering key aspects related to advanced event management, such as propagation and dispatching.
Zooming & panning, drag & drop, and brushing are interactive behaviors that rely on managing native events and different stages. Zooming applies transforms based on user actions, dragging tracks object coordinates during movement, and brushing selects elements within a chart area. D3 makes it easier to implement these features with its d3-zoom, d3-brush and d3-drag modules, which encapsulate native ...
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