Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Make a bar chart!

Public visualization

Make a bar chart!

0 stars1🌍 Public
Mmichielpunt86
Last edited Jul 17, 2020
Created on Jul 16, 2020

A horizontal bar chart displays the population of ten countries, sourced from data.csv, with China and India leading. The SVG chart is built using D3 v5, where `scaleLinear` maps population values to bar widths and `scaleBand` positions each country's bar vertically. The code reads the CSV, multiplies populations by 1000, and appends `rect` elements to the SVG, with bar height derived from the band width.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed