Skip to main content
100%

D3 Selection Exploration

✓ Published1🌍 Public
Mmegan-grannan
Last edited Aug 11, 2023
Created on Aug 11, 2023
Forked from D3 Starter

This example demonstrates real-time selection and animation with D3.js, displaying a set of circles that move based on a sine wave. The code uses `d3.select` to target the SVG container and `d3.range` to generate data points, then applies D3’s `.join()` method to handle enter, update, and exit states for the circles. The animation runs at 60 frames per second with `setInterval`, updating each circle’s x and y position based on time, while the `r` attribute is set only on initial entry.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes