Skip to main content
100%

Fork of Circles with D3

✓ Published0🌍 Public
JJingxuan Yang
Last edited Jan 15, 2024
Created on Jan 15, 2024
Forked from Circles with D3

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 description

Creating circles with D3.

Challenge

  • Fork this example
  • Modify it
  • Maybe make it Halloween themed
  • Maybe make it Christmas themed
  • Be creative
MIT Licensed

Similar vizzes