Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a face with D3.js

Public visualization

Viewing a saved revision (read-only)

e38418b95c504ed2ba51ef59dfedd7e1

Let's make a face with D3.js

0 stars1🌍 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.