Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

bowl off fruit click

Public visualization

bowl off fruit click

0 stars0🌍 Public
RRobindj2000
Last edited Dec 3, 2021
Created on Dec 3, 2021

Five circles, designed as apples and lemons, are shown in an SVG canvas. The visualization demonstrates D3 transitions as the dataset changes over time: a fruit is removed, an apple transforms into a lemon, and another fruit is deleted. The code uses D3's `selectAll`, `data`, and `transition` APIs to animate circle radius and x-position over two-second durations. Each circle has a click handler that logs to the console, and the color and size are mapped via `scaleOrdinal` based on the fruit type. The data is generated programmatically with `Math.random` for unique identifiers.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed