Skip to main content
100%

Shapes with SVG and CSS

✓ Published1🌍 Public
VVito
Last edited Nov 25, 2019
Created on Nov 25, 2019
Forked from Hello VizHub

This example demonstrates how to create and style basic geometric shapes—circles, rectangles, lines, and paths—using SVG elements combined with CSS classes. It highlights the flexibility of SVG for drawing shapes and the ability to control their appearance, such as fill colors, strokes, and line joins, through stylesheets. The visualization uses a D3 v5 selection to update a text message in the DOM, while the layout is achieved with SVG transformations. The code imports the `select` function from D3 and relies on an ES6 module for the displayed message.

AI-generated description

An example showing the capabilities of VizHub.

MIT Licensed

Similar vizzes