Skip to main content
Public

Share visualization

Loading preview…

Drawing One Circle

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Drawing One Circle

0 stars0Public
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

Comments

Sign in to join the discussion.

MIT Licensed