Skip to main content
100%

Making a Bar Chart

✓ Published1🌍 Public
JJMason88
Last edited Jun 4, 2019
Created on Jun 4, 2019

This bar chart displays the populations of ten countries, using horizontal bars sorted by country name. The visualization is built with D3.js v5, rendering to an SVG canvas. The code imports `csv`, `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to load the data, map population values to bar widths, and draw the axes. The chart demonstrates fundamental DOM manipulation by appending rectangles to the SVG group, with each bar's height set by the band scale's bandwidth.

AI-generated description

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

MIT Licensed

Similar vizzes