Making a bar chart with D3.js
✓ Published0🌍 Public
This example shows a horizontal bar chart of population per country, using data from WorldoMeter. The chart ranks countries from China to Japan by population, with each bar’s length scaled linearly. Built with D3 v5 and React, it renders SVG elements via `select`, `csv`, `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom`. Margins are applied to the SVG, and the bars are appended as `rect` elements with a steelblue fill.
AI-generated descriptionA bare minimum HTML page.
See also React Starter.
Bar chart of population per country taken from the WorldoMeter.
MIT Licensed