Skip to main content
100%

making a canvas!

✓ Published1🌍 Public
Ffernandotsurukawa
Last edited Oct 14, 2019
Created on Oct 14, 2019

This example demonstrates how to create a full-screen interactive canvas using D3 v5 and SVG rendering. The visualization fills the browser viewport with a single rounded rectangle, responding to the window dimensions by setting the SVG width and height attributes dynamically. The code uses D3’s `select` function to target the SVG element and appends a `<rect>` element with a 40-pixel corner radius. The stylesheet ensures the body has no margins and prevents overflow, making the canvas occupy the entire display area.

AI-generated description
MIT Licensed

Similar vizzes