Fork of HTML Starter
✓ Published0🌍 Public
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 descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed