Circle
✓ Published0🌍 Public
CCJKraenzle
Last edited Nov 12, 2017
Created on Nov 12, 2017
Four red circles sit at the corners of a square in an SVG canvas. Each circle’s radius scales up or down based on how the browser window is resized, turning the circles blue as they grow. The code uses D3 v4’s `selectAll`, `data`, `enter`, and `merge` to bind the static `[cx, cy, r]` dataset and update radii via the `window.onresize` event. The resizing logic tracks the window width with a counter, clamping the scale to a minimum of one.
AI-generated descriptionBuilt with blockbuilder.org
mit Licensed