Skip to main content
100%

Making a Bar Chart with D3

✓ Published0🌍 Public
WWhatTheFork85
Last edited Feb 24, 2020
Created on Feb 24, 2020

This example shows a horizontal bar chart of population figures for ten countries, ordered from largest to smallest. The visualization is built with D3 v5, using `d3.csv` to load the data, `scaleLinear` and `scaleBand` for the axes, and `axisLeft` and `axisBottom` to render tick marks. Population values are read as strings from the CSV and converted to numbers, then multiplied by 1000 before being mapped to bar widths. The SVG is styled with a steelblue fill for rectangles.

AI-generated description
MIT Licensed

Similar vizzes