Skip to main content
100%

Blank Canvas

✓ Published1🌍 Public
MMounikaBeerelly
Last edited Jun 9, 2020
Created on Jun 9, 2020

A full-screen SVG canvas is rendered with a single rounded rectangle that fills the entire browser viewport, adjusted dynamically to the window’s dimensions. The effect is a blank, bordered drawing area, with the current viewport dimensions logged to the console. Using D3 v5’s `select` method, the code sets the SVG’s width and height attributes, then appends a `rect` element with a 40-pixel corner radius, relying on `document.body.clientWidth` and `clientHeight` for sizing. No data or interactions are involved; the example simply demonstrates basic D3 SVG setup and responsive layout.

AI-generated description
MIT Licensed

Similar vizzes