Skip to main content
100%

D3 Blank Canvas

✓ Published1🌍 Public
Rrdeichert
Last edited Dec 16, 2019
Created on Dec 16, 2019
Forked from D3 Face

This example displays a blank, full-window SVG canvas with a single rounded rectangle filling the viewport. The code uses D3 v5's `select` function to target the SVG element and sets its width and height attributes based on the browser window dimensions. A `rect` element with a corner radius of 40 pixels is appended and sized to match the available space. The minimal setup demonstrates how to initialize a D3 visualization with dynamic sizing and CSS styling that locks the body to the viewport.

AI-generated description
MIT Licensed

Similar vizzes