🌍 Public
Viewing a saved revision (read-only)
bcad8c2314384616bf849b1da4b74d2a
71. D3 On HTML
Clicking the text updates a scatterplot with new random data. The example shows how to use D3's `on()` method with `transition` to change circle styling at the start and end of the animation, turning circles magenta and larger during the transition before returning them to black. It uses `d3.scaleLinear`, `d3.axisBottom`, and `d3.axisLeft` to render axes, with circles drawn as SVG elements and transitions animating their positions over 1000 milliseconds.
AI-generated description