Skip to main content
100%

Fork of HTML Starter

✓ Published0🌍 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.

MIT Licensed

Similar vizzes