Skip to main content
100%

D3 Workshop: Part 2 - SVGs and d3 Transitions

✓ Published0🌍 Public
CChrisChrisLoLo
Last edited Mar 24, 2018
Created on Mar 24, 2018

This example is a hands-on coding exercise built with D3.js v4 that teaches SVG manipulation and animated transitions. The page displays a static SVG canvas containing a blue rectangle, a red circle, and a yellow square, alongside a button that triggers a JavaScript function to run D3 code. The function programmatically appends a new green rectangle, animates its position using `transition().duration()`, and begins mapping an array of color data to new rectangle elements via `append()` and `attr()`. The code demonstrates core D3 concepts like selecting, appending, and transitioning SVG shapes, with an accompanying exercise checklist for learners to complete.

AI-generated description

Built with blockbuilder.org

forked from <a href='http://bl.ocks.org/ideaOwl/'>ideaOwl</a>'s block: <a href='http://bl.ocks.org/ideaOwl/95dca9b901fd96e46abf916e4caf3057'>D3 Workshop: Part 2 - SVGs and d3 Transitions</a>

forked from <a href='http://bl.ocks.org/ChrisChrisLoLo/'>ChrisChrisLoLo</a>'s block: <a href='http://bl.ocks.org/ChrisChrisLoLo/531b79f28d78dde930b7554662cabe38'>D3 Workshop: Part 2 - SVGs and d3 Transitions</a>

mit Licensed

Similar vizzes