Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Example D3 functions

Public visualization

Viewing a saved revision (read-only)

4df48924fe17437f9385cf3aeca7626d

Example D3 functions

0 stars0🌍 Public
EElodie31190
Last edited Oct 3, 2022
Created on Oct 3, 2022
Forked from D3 functions

This example demonstrates the enter, update, and exit pattern for circle elements in D3 v5, using two buttons to modify an array of data points. The "Remove" button pops the last item, turning the exiting circle red, while the "Modify" button replaces a random entry, updating the circle’s position via `scaleLinear` mappings. The code imports `select`, `scaleLinear`, and `max` from D3, and uses SVG rendering with a fixed 960×500 canvas.

AI-generated description