Skip to main content
100%

Shapes with SVG and HTML

✓ Published0🌍 Public
SShuzhanYang
Last edited Jun 4, 2020
Created on Jun 4, 2020

This example demonstrates how SVG and HTML elements can be used together to render geometric shapes on a web page. The visualization uses D3 v5’s `select` function to target an SVG element defined in the HTML, with its height and width extracted via `svg.attr`. A CSS class called `.highlighted` styles certain shapes in red, while the body margin is removed for full-bleed display. The code sets up the foundation for binding data to shape positions, though no explicit rendering or data mapping is visible in the provided files.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes