Skip to main content
100%

example 1

✓ Published0🌍 Public
NNita
Last edited Dec 21, 2018
Created on Dec 18, 2018
Forked from Smiley Face

A red square is drawn at a fixed position on a 900 by 600 SVG canvas, created with D3 v5. The example demonstrates a reusable rectangle component defined in a separate module, which appends an SVG `rect` element with specified width, height, x, y, and fill attributes. The main script imports `select` and `arc` from D3, though only `select` is used, and imports the custom `rectangle` function. The code includes unused scaffolding for x-position arrays and scales, but the visible rendering is limited to this single static shape.

AI-generated description
MIT Licensed

Similar vizzes