🌍 Public
Viewing a saved revision (read-only)
6a412b6c381d43f3a5fa14f2a8566bf5
Quiz 4
This example shows a simple interactive SVG visualization of three numbers that update on click. It demonstrates D3.js DOM manipulation by rendering text labels for an array, where each click doubles the values and updates the display. Using D3 v5’s `select`, `selectAll`, `append`, and `merge` APIs, the code manages entering, updating, and exiting elements dynamically from the SVG canvas. The initial view displays the numbers 1, 2, and 3, which transform to 2, 4, and 6 upon interaction, with no additional data source beyond the hardcoded array.
AI-generated descriptionDemonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.