🌍 Public
Viewing a saved revision (read-only)
d4a018b073384b16ae254471634d5b76
Fork of D3 Starter
This example demonstrates a simple path morphing animation controlled by user input. Two buttons, "Start Morphing" and "Reset Morphing," trigger transitions that interpolate between two SVG path definitions (`start` and `end`) using d3’s `transition.attrTween` on the `d` attribute. The code relies on D3 v6 for selection and transitions, while rendering to an inline SVG element. A static stroke path serves as the visual subject, with the animation changing its shape over a one-second duration when either button is clicked.
AI-generated descriptionA demonstration of how to start using D3 version 6.