Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Blank Canvas

Public visualization

Viewing a saved revision (read-only)

5323fccf470b4093a249f7321950bf32

Blank Canvas

0 stars1🌍 Public
MMajaha21
Last edited Apr 29, 2021
Created on Apr 28, 2021

This example shows a blank, rounded rectangle filling the browser window as a simple canvas. It demonstrates fundamental DOM manipulation and SVG creation using D3.js v5. The code calculates the width and height from the document body, sets the SVG element's size accordingly, and appends a rectangle with a defined corner radius. Using the `select` function and chained `attr` and `append` methods, it illustrates how to build and style SVG shapes entirely through D3’s programmatic interface.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.