Skip to main content
100%

Making a bar chart

✓ Published2🌍 Public
BbeauMarko
Last edited Sep 21, 2020
Created on Sep 21, 2020

This example shows a horizontal bar chart of population data for ten countries, with each bar’s length proportional to the population value. The chart uses D3 v5’s `scaleLinear` for the x-axis, `scaleBand` for the categorical y-axis, and `axisLeft` and `axisBottom` for tick marks. Data is loaded from a CSV file via `d3.csv`, with population values converted from thousands. Bars are rendered as SVG `rect` elements, styled with steelblue fill, within an SVG canvas.

AI-generated description
MIT Licensed

Similar vizzes