Skip to main content
Public

Share visualization

Loading preview…

Making Bar Chat

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

Making Bar Chat

0
Ccacho2294
Last edited Mar 27, 2020
Created on Mar 26, 2020
Forked from Making Bar Chat

This horizontal bar chart visualizes the populations of ten countries, with each bar’s length proportional to its population value. The chart uses D3’s `scaleLinear` for the x-axis, `scaleBand` for the categorical y-axis, and `axisLeft`/`axisBottom` to render tick marks and labels. Data is loaded from a CSV file via D3’s `csv` function, and populations are multiplied by 1000 to convert from thousands to actual counts. The SVG output is generated in the `render` function, which appends a group element and rects positioned using the computed scales.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed