Making a Bar Chart!
✓ Published1🌍 Public
This example shows a horizontal bar chart of country populations using a dataset loaded from a CSV file. The chart maps population values to bar widths with `d3.scaleLinear` and country names to vertical bands with `d3.scaleBand`, rendering SVG rectangles. Axes are added using `d3.axisLeft` and `d3.axisBottom`, while the code imports these functions from D3 v6 and handles the data with `d3.csv`. Population values are multiplied by 1,000 on load, and the chart is styled with a simple CSS rule for blue bars.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed