Making a Bar Chart
✓ Published1🌍 Public
This example shows a horizontal bar chart of population by country, with countries sorted alphabetically along the y-axis and population values on the x-axis. The visualization uses D3 v6’s `scaleLinear` for the population scale, `scaleBand` for the categorical country axis, and adds `axisLeft` and `axisBottom` for labeled ticks. Data loads from a CSV file, with populations multiplied by 1,000, and renders as SVG rectangles styled with a steel-blue fill.
AI-generated descriptionA bare minimum HTML page.
See also React Starter.
MIT Licensed