An example of a way to declare the end-state of a transition once in a generic setter with chaining, and then use that setter on the transition to update gradually or call it on a selection to jump to the end state.
Should work with .style()
, .attr()
, .styleTween()
, and .attrTween()
, but not .tween()
.
https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.10/d3.min.js