Skip to main content
100%

Making A Bar Chart

✓ Published1🌍 Public
SSergio Eijben
Last edited Nov 3, 2020
Created on Nov 2, 2020
Forked from D3 tutorial

This example displays a horizontal bar chart of population figures for ten countries, from China down to Mexico, using a clean SVG rendering with steel-blue bars. The visualization is built with D3 v6, loading the dataset via `d3.csv` and scaling the population values by one thousand before rendering. It employs `scaleLinear` for the population axis and `scaleBand` for the categorical country labels, with axes generated by `axisLeft` and `axisBottom`. The layout applies explicit margins and transforms to position the chart within a fixed 960-by-500 viewport.

AI-generated description
MIT Licensed

Similar vizzes