Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Drawing One Circle

Public visualization

Viewing a saved revision (read-only)

33356a73e1994d11a55c90b5441e7401

Drawing One Circle

0 stars0🌍 Public
CCurran Kelleher
Last edited May 12, 2024
Created on May 12, 2024

This example renders a single circle centered within an SVG element created by D3’s selection join pattern. The program uses `d3.select` and the `join` method to manage both the SVG and circle, setting the circle’s `cx` and `cy` attributes to the container’s measured width and height. Its primary purpose is demonstrating an immutable update structure, as described in the README, where state changes follow Redux-style patterns. The visualization does not respond to mouse events; it shows a static, fixed-radius circle.

AI-generated description

A program that follows the mouse around and changes its color using immutable update patterns.

Challenge

  • Use this pattern to make something else respond to mouse events