Skip to main content
100%

Dynamic Width & Height

✓ Published1🌍 Public
Ddaanasma
Last edited May 5, 2020
Created on May 5, 2020
Forked from Interactive maps

This example dynamically sizes a D3.js visualization to fit the full browser viewport. The visualization draws a single rounded rectangle that fills the entire window, with its width and height directly tied to the dimensions of the `document.body` element. The code uses D3's `select` function to grab the SVG element and append the rectangle, setting its `rx` attribute for rounded corners, while CSS positions the body to prevent scrolling. The rendering approach is purely SVG-based, with no external data source.

AI-generated description

Mapping

some Mapping interactionz

MIT Licensed

Similar vizzes