Making a bar chart
✓ Published0🌍 Public
This example shows a horizontal bar chart of country populations, with each bar’s length proportional to the population value. The chart uses D3 v5’s `scaleLinear` for the x-axis and `scaleBand` for the y-axis, rendering SVG rectangles whose `width` and `y` attributes are set from the data. Population values from the CSV file are multiplied by 1000 to reflect actual counts, and the data is loaded asynchronously via `d3.csv`.
AI-generated descriptionMIT Licensed