block by mbostock 3f987887d5c2148661ae

Transition to Default

Full Screen

This example demonstrates how to transition back to a default style value after setting an inline style. Inside, temporarily remove the style to retrieve its default value; then restore the style before starting the transition.

In a future version of D3 (see related issue),, null) will probably do this for you automatically, rather than its current behavior of immediately removing the specified style at the start of the transition.