Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Creating the Bar Chart

Public visualization

Creating the Bar Chart

0 stars1🌍 Public
Eedmond gihozo
Last edited Mar 28, 2020
Created on Mar 28, 2020

This bar chart displays population counts for eight countries, with horizontal bars ordered from most to least populated. The visualization encodes data from a local CSV file using D3 scales—a linear scale for population and a band scale for country names. Rendering as SVG, the code applies D3’s `axisLeft`, `axisBottom`, `scaleLinear`, and `scaleBand` APIs to construct the axes and bars. Styling is handled through CSS, which sets bar fill colors, tick labeling, and the chart title.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed