🌍 Public
Viewing a saved revision (read-only)
84949ae264c54c768666c36b5a511ae3
Let's make a face with D3.js
This example demonstrates how data binding and updates with D3 v5 can make a face out of fruit circles. The code uses `d3.select`, `scaleOrdinal` for color and radius, and joins circle elements to an array of fruit objects. Initially five apples render; after one second, a fruit is removed via `fruits.pop()`, and after two seconds, one apple becomes a lemon, updating the visualization with enter, update, and exit selections.
AI-generated descriptionAn example showing the capabilities of VizHub.