D3 Workshop: Part 2 - SVGs and d3 Transitions
This example demonstrates interactive D3 transitions on SVG shapes, starting with static blue, red, and yellow elements before a button triggers animated rectangles that move to random coordinates and change colors based on an array of six color objects. It uses d3 v4, including `selectAll`, `data`, `enter`, `merge`, and chained `transition()` calls with `.duration()`. The code binds data to newly appended rectangles, animating their x/y positions and fill colors, illustrating data joins and update patterns.