Making a bar chart
✓ Published1🌍 Public
This example shows a horizontal bar chart of population counts for the top 10 most populous countries, using data from a CSV file. The bars are rendered as SVG rectangles, with a linear scale mapping population to bar width and a band scale for country labels. The code uses D3 v5 functions including `csv`, `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom`, with tick labels formatted via `format('.3s')`. A React starter template is referenced, though the visible implementation uses plain D3 with an SVG container.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed