Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

D3 Blank Canvas

Public visualization

D3 Blank Canvas

0 stars1🌍 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

Comments

Sign in to join the discussion.

MIT Licensed