🌍 Public
Viewing a saved revision (read-only)
7894c001f1ac45eeb84a3a04f14e1462
Making a Bar Chart
This example creates a horizontal bar chart of country populations using React and D3 v7, rendering to SVG. It loads data from a CSV file and uses `d3.scaleLinear` and `d3.scaleBand` to map population values and country names to positions, with `d3.axisLeft` and `d3.axisBottom` generating the axes. The bars are drawn as `rect` elements appended to a grouped SVG container.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.