Making a Bar Chart
✓ Published1🌍 Public
This example presents a horizontal bar chart of the population of South American countries, with Argentina through Venezuela listed from top to bottom. It uses D3 v5 to load population data from a CSV file, converts the population values to thousands, and renders the chart as SVG. The code employs `d3.scaleBand` for the categorical y-axis, `d3.scaleLinear` for the quantitative x-axis, and `d3.axisLeft` and `d3.axisBottom` to generate axes. Tick lines extend across the plot area, and a formatted axis label indicates the unit.
AI-generated descriptionMIT Licensed