Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Responding to Resize

Public visualization

Viewing a saved revision (read-only)

944463d966464a3583bcd6d3f631a4f6

Responding to Resize

0 stars0🌍 Public
BBlackTecno
Last edited Nov 11, 2019
Created on Nov 11, 2019

The chart fills the entire browser viewport using CSS positioning, and an SVG drawing updates its dimensions to match the container’s computed width and height. The visualization draws a large green X spanning the full diagonal of the canvas, with its stroke width and opacity fixed. The code uses `d3.select` and `d3.append` from D3 v5 to create the SVG, and it redraws the X by reading `clientWidth` and `clientHeight` and re-appending line elements whenever the window resizes via the `resize` event listener.

AI-generated description