Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bar Chart D3.js!

Public visualization

Bar Chart D3.js!

0 stars0🌍 Public
BBenjamin Gorman
Last edited Jan 12, 2022
Created on Jan 12, 2022

A bar chart displays population counts for ten countries using D3.js v5 with SVG rendering. The code loads data from a CSV file and uses `d3.csv`, `d3.scaleLinear` for the x-axis, and `d3.scaleBand` for the categorical y-axis. Rectangles are appended via data joins, with widths proportional to population values (converted from thousands to absolute numbers). The example demonstrates core D3 selection, scaling, and DOM manipulation patterns in a straightforward horizontal bar layout.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.

Comments

Sign in to join the discussion.

MIT Licensed