3 ms·
You can transition the stroke-dasharray property and use element.getTotalLength to determine the total length of the path. Here’s a bl.ock: http://bl.ocks.org/
by mbostock 12y ago
You can transition the stroke-dasharray property and use element.getTotalLength to determine the total length of the path. Here’s a bl.ock:
http://bl.ocks.org/mbostock/5649592 http://bl.ocks.org/mbostock/5649592
And here’s an older graphic that demonstrates the technique in use:
http://www.nytimes.com/interactive/2013/02/20/movies/among-the-oscar-contenders-a-host-of-connections.html http://www.nytimes.com/interactive/2013/02/20/movies/among-t...
We also used this technique to render the progress map in The Russia Left Behind:
http://www.nytimes.com/newsgraphics/2013/10/13/russia/ http://www.nytimes.com/newsgraphics/2013/10/13/russia/