🌍 Public
Viewing a saved revision (read-only)
8ade608b3dfa48f4ad568b129bd012c4
Shapes with SVG and CSS
This example demonstrates how to draw basic shapes—circles, rectangles, lines, and paths—using SVG elements embedded directly in an HTML page, with styling controlled through CSS. The code uses D3.js v5 to select the SVG container and relies on standard SVG attributes like `cx`, `r`, `x`, `y`, and `d` to define geometry. A simple transform group shifts and scales the shapes, while stroke and fill properties, including a blue fill with black stroke on a subgroup, show how visual appearance is set.
AI-generated descriptionAn example showing the capabilities of VizHub.