🌍 Public
Viewing a saved revision (read-only)
4c033f3adc9c4de6b4ae81cde05dc6a4
Fork of D3 functions
This example shows how D3’s data join handles dynamic updates to a scatterplot of five circles. Buttons trigger removal or modification of data points, with exiting circles turning red while new and updated circles render in steel blue. The code uses D3 v5’s `select`, `scaleLinear`, and `merge` to bind array data to SVG circles. Updates call the `update` function, which handles enter, update, and exit selections, while random coordinates come from a custom `rand` helper.
AI-generated description