Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

D3 functions

Public visualization

Viewing a saved revision (read-only)

c802b1dc537d4fa48bb001407e719b58

D3 functions

0 stars4🌍 Public
TTimothyMiage
Last edited Mar 20, 2023
Created on Sep 27, 2022
Forked from D3 Starter

This example demonstrates D3’s data-join pattern with a set of circles plotted on an SVG canvas. Buttons trigger updates: “Remove” pops a data point, while “Modify” replaces a random point with new coordinates. Using `selectAll('circle')`, `enter`, `merge`, and `exit`, it shows how to handle entering, updating, and exiting elements. The code uses D3 v5’s `scaleLinear`, `select`, and `max`, with data defined as an array of `{x, y}` objects and rendering via SVG circles.

AI-generated description