Skip to main content
100%

Making a bar chart

✓ Published0🌍 Public
Kkiyimba5
Last edited Mar 5, 2021
Created on Mar 5, 2021

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 description
MIT Licensed

Similar vizzes