Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of fruit - Hover to select

Public visualization

Viewing a saved revision (read-only)

1475ac8ad9d94b57850b8bac024f2141

Bowl of fruit - Hover to select

0 stars0🌍 Public
PPeter S
Last edited Aug 18, 2019
Created on Aug 17, 2019

A bowl of fruit renders as a row of colored circles, each sized by fruit type, with hover highlighting the selected fruit via a black stroke. The example demonstrates data joins and transitions, using D3 v5 scales (scaleOrdinal) and selection methods (enter, merge, exit). Circles animate radius and position over one-second transitions as fruits are added, removed, or changed programmatically, with React-like state management via a setSelectedFruit callback. SVG serves as the rendering target.

AI-generated description

An example showing the capabilities of VizHub.