Fork of Circles with D3
✓ Published0🌍 Public
This example draws two rotated rectangles and a triangle on a light blue background using D3.js, forming a simple fork-like geometric composition centered on the display. The code imports the `select` function from D3 and binds an array of rectangle and polygon data objects to SVG `rect` and `polygon` elements, setting their positions and fill color via `.attr()`. A fixed rotation transform is applied to both shape groups relative to the canvas center. The shape data is defined manually within the script, and the visualization adapts to the container’s width and height.
AI-generated descriptionCreating circles with D3.
Challenge
- Fork this example
- Modify it
- Maybe make it Halloween themed
- Maybe make it Christmas themed
- Be creative
MIT Licensed