Making a Bar Chart
✓ Published1🌍 Public
This example shows a horizontal bar chart ranking the ten most populous countries, with each bar’s length proportional to population and countries ordered along the y-axis. The visualization uses D3 v5’s `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to position bars and axes, while `csv()` loads the data and `selectAll` appends SVG rectangles. Population values are multiplied by 1000, and the chart is rendered in an SVG canvas with steelblue bars.
AI-generated descriptionMIT Licensed