Skip to main content
Public

Share visualization

Loading preview…

Nested Elements

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

Nested Elements

1
JJoachim Klug
Last edited Sep 18, 2020
Created on Sep 18, 2020

Five circles, alternately sized and colored red or yellow to represent apples and lemons, are arranged horizontally. The visualization demonstrates nested SVG elements, using D3 v6 to manage dynamic updates. Data updates trigger transitions: an apple is eaten, one apple is replaced by a lemon, and finally an apple is removed, showing how the chart handles changes in data over time. The code uses D3's `select`, `range`, and custom `scaleOrdinal` functions to create and update the SVG groups, circles, and text labels.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed