Skip to main content
100%

Blank Canvas

✓ Published1🌍 Public
AAjit Singh
Last edited Jan 7, 2021
Created on Jan 7, 2021

This example demonstrates an empty SVG canvas that fills the browser window and displays a rounded rectangle as its only visual element. The code uses d3.select to target the SVG element and sets its width and height to match the available viewport dimensions, then appends a rect with a corner radius. The D3 v6 select method and attribute chaining handle the SVG drawing, while the fixed CSS positioning ensures the canvas remains anchored to the viewport.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes