Skip to main content
Public

Share visualization

Loading preview…

Animated bar chart

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

Animated bar chart

0
Jjesramyep1263
Last edited May 10, 2020
Created on May 10, 2020

This example displays population changes over time using an animated bar chart in SVG. Bars grow in height sequentially as each year is added, with green bars that turn red and expand slightly on mouseover. The visualization is built with D3 v4, using `d3.scaleBand` for the x-axis, `d3.scaleLinear` for the y-axis, and `d3.axisBottom` and `d3.axisLeft` for ticks. Bar entrance animations use `transition().delay()` and `ease(d3.easeLinear)`, while hover effects rely on `transition().attr()` calls. Data comes from a CSV file with year and population values.

AI-generated description

An example including some commonly used features of SVG.

Comments

Sign in to join the discussion.

MIT Licensed