🌍 Public
Viewing a saved revision (read-only)
88f9e6eaaa7045b9a3ae46a387ef1b38
Making a Bar Chart
A bar chart displays population data for five countries using horizontal bars. The example builds the chart through D3.js version 5, using `d3.csv` to load the data, `d3.scaleLinear` for the x-axis, and `d3.scaleBand` with padding for the y-axis categories. Rectangles are appended to an SVG element, with bar widths proportional to each country's population. The code marks a basic introduction to D3's data-binding and scale functions.
AI-generated descriptionDemonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.