HOME

10. Transitions

In the previous page we introduced tranformations. Transformation are instant events, which immediately applies to the target element.
For this reason in the previous example we used some "plain old JavaScript" trick to set the timing of the tranformation.
Of course there is a better way to bring to life tranformations: using CSS3 transitions.
In this page we show how to add CSS3 transitions to D3's tranformations using the D3's API.


This paragraph will start getting red after 1 second

This paragraph will become green in 5 seconds, but starting from white


Show code


D3.js API reference