Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Make a face with D3.js

Public visualization

Viewing a saved revision (read-only)

af274381751749d1845bd56a8c6401c4

Make a face with D3.js

0 stars1🌍 Public
Aavirathtib
Last edited Dec 29, 2021
Created on Dec 29, 2021

A smiley face is rendered in an SVG canvas using D3.js v7, with a yellow circle for the head and two black circles for the eyes. The code appends each circle to the selected `svg` element, setting its radius and horizontal/vertical position via `attr` in relation to the SVG’s `width` and `height`. The styling is handled by an external CSS file that removes page margins. This example demonstrates basic D3 shape creation and attribute manipulation for static visual output.

AI-generated description