🌍 Public
D3 functions
This example demonstrates D3 data joins with interactive buttons that remove or modify circles in an SVG scatterplot. Clicking "Remove" pops the last item from an array of x/y coordinates, redrawing the remaining circles; clicking "Modify" replaces one random entry with new values. The code uses `select`, `scaleLinear`, and `max` from d3 v5, along with a custom `rand` utility, to update circle positions via enter/merge/exit selections. The visualization highlights how shared update logic handles both new and existing elements.
AI-generated descriptionMIT Licensed
Comments
Sign in to join the discussion.