🌍 Public
Viewing a saved revision (read-only)
5e5a504b8ed3421f8086a9293925665c
D3 selection exploration
This example demonstrates animated selection and data-join techniques in D3, showing fifteen circles bobbing vertically in a sine-wave pattern across the screen. The visualization uses d3.select and d3.range to generate data, then applies the .join('circle') method to bind that data to SVG elements. A setInterval loop running at 60 frames per second updates the circles’ cx and cy attributes, with the y-position calculated from a sine function of the data index and a time variable t. The animation relies entirely on d3 v7’s selection methods and SVG rendering.
AI-generated descriptionA demonstration of how to start using D3 version 6.