Skip to main content
100%

Let's make a face with D3.js

✓ Published1🌍 Public
GGeolffrey S Mena
Last edited Dec 21, 2019
Created on Dec 21, 2019

A D3.js v5 example demonstrates data-binding and enter/exit updates by rendering a row of fruit as SVG circles. Five apples appear initially, then one is removed after a second, and a third apple becomes a lemon after two seconds, illustrating dynamic updates to the DOM. Using `d3.select`, `scaleOrdinal`, and `range`, the code maps fruit types to fill colors and radii, with all circles positioned via `attr` and removed via `.exit().remove()`.

AI-generated description

An example showing the capabilities of VizHub.

MIT Licensed

Similar vizzes