Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Blank Canvas

Public visualization

Blank Canvas

0 stars1🌍 Public
XXin Li
Last edited Mar 25, 2021
Created on Mar 25, 2021

This example shows an interactive blank canvas where a single rounded rectangle fills the entire browser viewport. The visualization dynamically adapts to the window size by reading `document.body.clientWidth` and `clientHeight`, then applying these dimensions to both the SVG container and the rectangle via D3’s `select` and `attr` methods. The code uses D3 v6 and renders purely as SVG markup.

AI-generated description

An example including some commonly used features of SVG.

Comments

Sign in to join the discussion.

MIT Licensed