🌍 Public
SVG
This example demonstrates basic SVG shapes rendered inside an HTML page using D3.js version 7. The code creates a red horizontal line and the start of a rectangle, showcasing SVG attributes such as coordinates, stroke, and stroke-width. The JavaScript uses D3’s selection and appending methods (`d3.select`, `svg.append`) to build the visual elements. The SVG canvas is defined with fixed width and height, and the script is included from the D3 CDN, with a minimal HTML structure in `index.html`.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed
Comments
Sign in to join the discussion.