Skip to main content
100%

Lab 3 SVG and D3

✓ Published0🌍 Public
AArthur Kozhevnik
Last edited Feb 3, 2022
Created on Jan 27, 2022
Forked from HTML Starter

This example demonstrates basic SVG shape rendering and D3 selection manipulation. It displays multiple rectangles, an ellipse, a red teardrop-like path, and a yellow star-like polygon on a blank canvas. The code uses d3.v4 to select all rectangle elements via `d3.selectAll('rect')`, applies a red fill style, and iterates through each with `.each()` to set an `r` attribute. The SVG layout uses explicit coordinates and a transform translation for the grouped central shapes, with CSS styling linked from an external stylesheet.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes