Book Image

Data Visualization with D3 and AngularJS

By : Erik Hanchett, Christoph Körner
Book Image

Data Visualization with D3 and AngularJS

By: Erik Hanchett, Christoph Körner

Overview of this book

Table of Contents (16 chapters)
Data Visualization with D3 and AngularJS
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 8. Bringing the Chart to Life with Interactions

In this chapter, we want to bring the chart to life and make the previous visualizations interactive. The biggest advantage of presenting data visualizations and graphs on the Web is that they can become interactive very easily. Interactive visualizations allow a much better understanding and processing of the data.

First, we will speak about events and event listeners in JavaScript in general. Then, we will focus on D3.js. This will enable us to understand how interactions are implemented on the lowest level and take this knowledge to implement a higher level control.

Then, we will directly use the event listeners to implement cursors for the previously developed chart directives. After a simple example, you will learn how to extract the nearest data point relative to the cursor position in order to implement snappy cursors.

In the following section, you will learn how to create custom events with D3.js in order to update the AngularJS...