Using tweening

Tween comes from the word inbetween, which is a common practice performed in the traditional animation where after key frames were created by the master animator, less experienced animators were used to generate frames in between the key frames. This phrase is borrowed in modern computer-generated animation and refers to the technique or algorithm that controls how the inbetween frames are generated. In this recipe, we will examine how the D3 transition supports tweening.

Getting ready

Open your local copy of the following file in your web browser:

How to do it...

In the following code example, we will create a custom tweening function to animate a ...

Get Data Visualization with D3 4.x Cookbook - Second Edition now with O’Reilly online learning.

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