Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart

Public visualization

Viewing a saved revision (read-only)

7d97e34531de4a9690cecb30539097c4

Making a Bar Chart

0 stars1🌍 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.