Skip to main content
100%

Makeing a Bar Chart with D3

✓ Published1🌍 Public
TTrustPaul
Last edited Nov 16, 2020
Created on Nov 2, 2020

This example shows a horizontal bar chart ranking country populations using D3. The SVG chart maps country names to a band scale on the y-axis and populations to a linear scale on the x-axis, drawing steel-blue rectangles with axes generated by `d3.axisLeft` and `d3.axisBottom`. The code loads data from a local CSV file via `d3.csv` and parses the population values as numbers. The React starter code imports select, scales, and axes from D3 for modular integration.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes