Skip to main content
100%

Making a bar chart

✓ Published0🌍 Public
Ccguibourg
Last edited Oct 25, 2019
Created on Oct 25, 2019
Forked from Making a bar chart

This example visualizes the population of the ten most populous countries in 2018, using a horizontal bar chart drawn with SVG. The data, sourced from the United Nations, is loaded from a CSV file and parsed with D3’s `csv` method, then mapped to pixel positions using `scaleLinear` and `scaleBand`. The chart displays axes generated via `axisLeft` and `axisBottom`, with bars rendered as `rect` elements. D3 v5’s selection and data-join methods are used to bind and draw each bar.

AI-generated description

population of top 10 most populous countries in 2018. source: United Nations

MIT Licensed

Similar vizzes