Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of HTML Starter

Public visualization

Viewing a saved revision (read-only)

9ee6566df68d4a80b9754824bc536dbe

Fork of HTML Starter

0 stars0🌍 Public
NnitishGangadhari
Last edited Feb 10, 2022
Created on Feb 9, 2022
Forked from HTML Starter

This example uses D3 v7 to draw a simple smiley face on an SVG canvas. It appends a yellow circle for the face and two smaller black circles for the eyes, positioning them relative to the SVG’s width and height attributes. The code uses `d3.select` to target the SVG element and the `.attr()` method to set circle properties such as radius, center coordinates, fill color, and stroke. Eye spacing and vertical offset are defined as numeric constants, and all geometry is computed dynamically from the SVG’s dimensions.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.