Skip to main content
100%

Quiz 4

✓ Published0🌍 Public
JJordan Chiu
Last edited Jan 27, 2020
Created on Jan 27, 2020

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 description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.

MIT Licensed

Similar vizzes