Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart

Public visualization

Making a Bar Chart

0 stars0🌍 Public
SSorin Neculae
Last edited Jun 25, 2020
Created on Jun 25, 2020
Forked from Making a Bar Chart

This example displays a horizontal bar chart of population counts for ten countries, showing the relative magnitude of each nation’s population. The chart uses a linear x-scale for population values and a categorical y-scale for country names, rendered as SVG rectangles filled with steel blue. The visualization is built with D3 v5, using `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to construct the scales and axes. Data is loaded from a CSV file (`TotalPop.csv`) using D3’s `csv` function, with values parsed to numbers before rendering.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed