Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Shapes and Colors with SVG and CSS

Public visualization

Viewing a saved revision (read-only)

142b283bc4324b9d8e25c2449569bf7e

Shapes and Colors with SVG and CSS

0 stars0🌍 Public
KKateryna
Last edited Sep 24, 2020
Created on Sep 21, 2020

Five fruits appear as red circles labeled “apple” in an SVG bowl. Over time, the array shrinks, one apple changes to a yellow lemon, and another apple is removed, with each change animated using D3 transitions. The code imports `scaleOrdinal` and `range` from D3 v6, and uses `selection.data`, `.enter`, `.merge`, and `.exit` to update circles and text labels. Styling is handled by CSS, with D3 controlling SVG attributes like `cx`, `r`, and `fill`.

AI-generated description