Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Smiley with D3.js

Public visualization

Viewing a saved revision (read-only)

f9692219dd4b4710b60b48e8bdae64ff

Smiley with D3.js

0 stars0🌍 Public
Wwindwardpassage
Last edited Jan 31, 2020
Created on Jan 31, 2020
Forked from Smiley with D3.js

This example demonstrates basic SVG rendering with D3.js by drawing a series of circles whose positions and colors update dynamically with changing data arrays. The code uses D3 selections and the `data()` join to append circle elements, mapping each value to a vertical position (`cy`) and a red or blue fill depending on whether the value exceeds 30. It highlights the enter selection pattern by calling `updateVis` twice with different datasets, showing how new circles are added incrementally. The visualization relies on D3 v3’s core selection API and standard SVG attributes within a 960x500 canvas.

AI-generated description

An example including some commonly used features of SVG.