Skip to main content
100%

Blank Canvas

✓ Published1🌍 Public
GGino Dzin
Last edited Feb 15, 2020
Created on Feb 15, 2020

A blank SVG canvas fills the browser viewport, rendered as a single rounded rectangle that adapts to the window’s dimensions. The example demonstrates a minimal setup for D3 v5 with React, using `select` from `d3` to target the `<svg>` element and setting its `width` and `height` attributes based on `document.body.clientWidth` and `document.body.clientHeight`. The code appends a `rect` with a 40-pixel corner radius via SVG’s `rx` attribute, while the stylesheet fixes the body to prevent scrolling. It serves as a starting point for building more complex visualizations.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes