Skip to main content
Public

Share visualization

Loading preview…

Fork of Fork of Circles with D3

vizhub.com

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

Before sharing, review the publishing checklist.

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

Fork of Fork of Circles with D3

2
BBismark Kofi Owusu Sarfo
Last edited Aug 27, 2025
Created on Aug 27, 2025

This example animates a set of colored circles and lines on a pale green background. The circles grow from a radius of zero to their target sizes, while the lines draw themselves from their starting coordinates to their final endpoints. The visualization uses D3.js v7, with all SVG elements created and animated through D3's selection join operation. The `animateCircles` and `animateLines` functions leverage D3's `.transition().duration(1000)` API to smoothly interpolate the circle radii and line x2/y2 attributes over one second.

AI-generated description

D3 Visualization with Animatable Lines and Circles

This visualization demonstrates animatable SVG elements using D3.js. Both circles and lines are animated on load, with circles growing from radius 0 and lines drawing from their starting point to their ending point.

The line elements have animatable x2 attributes (x-axis coordinate of the line ending point) as specified in the task.

Comments

Sign in to join the discussion.

MIT Licensed