Skip to main content
100%

Making a Bar Chart with D3

✓ Published0🌍 Public
WWRCIECH
Last edited Feb 23, 2020
Created on Feb 23, 2020

This example shows a horizontal bar chart of population counts for the ten most populous countries, derived from a CSV file where values are normalized by dividing by 1000. The visualization uses D3 v5’s `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to map population to bar width and country names to vertical bands, rendering SVG rectangles with a steelblue fill. Margins offset the chart within an SVG sized 960 by 500, with axes labeled using D3’s axis generators.

AI-generated description
MIT Licensed

Similar vizzes