Skip to main content
100%

CDF test!

✓ Published0🌍 Public
CCBasis
Last edited May 2, 2016
Created on May 2, 2016

This example demonstrates an interactive text slide animation on an SVG canvas. It shows a message that shrinks and is replaced by an arrow symbol when clicked. The code uses d3.js to append a text element and a path, then links the text to the path via a `textPath` with a `startOffset` attribute. A click event triggers a transition that animates the `startOffset` to slide the text out of view, then swaps the text content after the animation ends. The rendering uses SVG and d3 transitions with a duration of 750 milliseconds.

AI-generated description

SVG / d3 text transition

This d3 demonstration creates a text element on a SVG canvas and adds a path and text path. These elements allow for the added text to "slide" out of view via the startOffset property. Click on the text above to see the result.

forked from <a href='http://bl.ocks.org/jdittmar/'>jdittmar</a>'s block: <a href='http://bl.ocks.org/jdittmar/7800481'>SVG / d3 text transition</a>

Similar vizzes