Activity6_Question1.2
✓ Published0🌍 Public
This example displays a horizontal bar chart ranking 20 countries by their 2010 population, using data from a CSV file loaded via d3.csv. It renders bars as SVG rectangles inside a React component, with d3.scaleBand mapping country names to y-axis positions and d3.scaleLinear mapping population values to bar widths. The chart includes formatted axis ticks via d3.format, a bottom axis label, and tooltips showing each bar’s value through SVG <title> elements.
AI-generated descriptionMIT Licensed