Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of Fruit with Labels

Public visualization

Viewing a saved revision (read-only)

b66d899254584088b65ba96e69df883c

Bowl of Fruit with Labels

0 stars0🌍 Public
Ssherryyx
Last edited Feb 3, 2020
Created on Feb 3, 2020

This example demonstrates a dynamic bowl of fruit, initially containing five apples, which are visually removed or transformed into lemons over time. The visualization uses the D3.js framework (v5) to render scalable vector graphics (SVG) elements, animating a change in radius, fill color, and labels for each fruit. The d3 scaleOrdinal function maps fruit types to distinct sizes and colors, while the data join and transition methods manage the addition and removal of graphical elements. The animation is driven by setTimeout calls that alter the underlying data array and trigger a re-render of the scene.

AI-generated description