Making a bar chart
✓ Published0🌍 Public
A horizontal bar chart ranks ten countries by population, using the top-ten data sample of 2018 estimates. The chart encodes population in bar widths and country names on the y-axis. Built with D3 v5, it loads data from `data.csv`, parses populations, and renders SVG rectangles using `d3.scaleLinear`, `d3.scaleBand`, and `d3.max` to set scales and domains. The code imports `select`, `csv`, and scale functions via ES modules and appends a grouped `<g>` element with margin transforms.
AI-generated descriptionMIT Licensed