Skip to main content
Public

Share visualization

Loading preview…

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

Bar Chart

1
PPerry
Last edited Mar 2, 2020
Created on Mar 2, 2020
Forked from HTML Starter

This bar chart displays 2018 state population data from datausa.com. It uses D3 v5 with an SVG rendering approach, mapping population values to horizontal bar lengths against state labels. The code employs `d3.csv`, `scaleLinear`, and `scaleBand` to process the data and position the bars, with `axisLeft` and `axisBottom` generating the chart’s axes. Each state’s population is represented by a steel-blue rectangle, sorted alphabetically along the vertical axis.

AI-generated description

Bar chart shows 2018 population data from datausa.com.

Comments

Sign in to join the discussion.

MIT Licensed