Skip to main content
Public

Share visualization

Loading preview…

Shapes and Colors with SVG and CSS

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Shapes and Colors with SVG and CSS

0
Jjesramyep1263
Last edited Apr 13, 2020
Created on Apr 13, 2020

Fifty circles arranged vertically cycle horizontally across the screen in an animated loop. Each circle’s fill color transitions from light yellow to dark navy based on its vertical position, using a linear scale with HSL interpolation. The example demonstrates SVG shape rendering and CSS styling, with animations driven by D3 v4’s `transition` and `d3.active()`. The code uses `d3.scalePoint` for layout and `d3.scaleLinear` for color mapping, all within a single SVG canvas.

AI-generated description

An example including some commonly used features of SVG.

Comments

Sign in to join the discussion.

MIT Licensed