Skip to main content
100%

Making a Bar Chart

✓ Published1🌍 Public
Ssafdarnu
Last edited Mar 26, 2020
Created on Mar 26, 2020
Forked from Face with D3.js!

This example shows a horizontal bar chart of population counts for major world regions, using a bar’s length to encode each region’s population value. The visualization renders as SVG rectangles positioned with a `d3.scaleBand` y-scale and sized with a `d3.scaleLinear` x-scale, both fed from a CSV file read via `d3.csv`. Data values are coerced to numbers before scaling, and the chart fills the full SVG dimensions defined in the HTML. React and D3 v5 work together, with selections and scales imported directly from the `d3` package.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes