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

Summary


In this chapter, you learned the basics of animations in D3.js. You also learned that animations are timer triggered changes of properties. D3.js implements high performance timers and uses the native requestAnimationFrame() method if available.

Interpolators are parametric functions that return an interpolated value for a parameter between 0 and 1. D3.js integrates a variety of interpolation functions, but we can easily implement a new one for our data types. Transitions are much more comfortable and elegant than creating custom timers and interpolators. We also saw how to chain and stagger transitions and put them together piecewise to create animations.

After playing around with some examples of transitions, we discovered that there exist attributes that cannot be automatically interpolated. This concerns mainly the area and line generators that are used to generate the d attribute for path elements. Tweens are a way to implement custom interpolation functions for the transition...