Making a Bar Chart
✓ Published1🌍 Public
This example shows a bar chart of the populations of the ten most populous countries in 2020, drawn as an SVG. The chart uses horizontally-oriented bars with a linear population scale on the x-axis and a band scale for country names on the y-axis. Built with D3 v5, it loads data from a CSV file and uses `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to construct and label the visualization. The bars are rendered as SVG rectangles with a steelblue fill.
AI-generated descriptionMIT Licensed