Making a bar chart
✓ Published0🌍 Public
This example shows a horizontal bar chart ranking the world’s ten most populous countries, with population values labeled in billions and a steel-blue fill for each bar. It uses D3 v5’s `csv` loader to import data, `scaleLinear` and `scaleBand` for positioning, and `axisBottom` with a custom tick formatter that converts G to B. The SVG rendering includes margins, a title, and an axis label, demonstrating core DOM manipulation through `select` and `append`.
AI-generated descriptionDemonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.
MIT Licensed