block by jhellier 26fdb3c8ebd5dcb9a143

Adobe SVG to D3 w/ Mods

Full Screen

Built with blockbuilder.org

This is an example of a graphic created in Adobe Illustrator and imported into a D3 based page. This is a followup of an earlier block “Adobe SVG to D3”. The earlier block explains more about the mechanics of bringing in a new SVG element.

This block creates four copies of the original star graphic SVG and shows how to access each one as if it were a D3 based SVG element. The styling colors are changed and the movement of each is distinct as well as capturing mouse events for each SVG.

This graphic although simple is a good example of one that you would not want to have to code the path yourself. Very easy to do in Adobe Illustrator but very painfull to get right if you were trying to code it manually.

index.html

star1.xml