Skip to main content
100%

Shape With SVG and CSS

✓ Published0🌍 Public
Aalbanodossantos
Last edited Oct 25, 2019
Created on Oct 23, 2019
Forked from Hello VizHub

This example demonstrates basic SVG shape rendering with D3.js and CSS styling. The code draws circles, rectangles, lines, and paths on a dark blue background using D3’s `select` API and hardcoded coordinates. Shapes are grouped with SVG `<g>` elements, with CSS classes controlling stroke and fill properties. D3 v5 loads from a CDN, while the page displays a "Hello VizHub!" message via ES6 module imports. The visualization also includes transparent and colored shapes, with inline attributes like `stroke-width` and `fill` overriding stylesheet rules.

AI-generated description

An example showing the capabilities of VizHub.

MIT Licensed

Similar vizzes