Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Makeing a Bar Chart with D3

Public visualization

Makeing a Bar Chart with D3

0 stars2🌍 Public
Ssimon0863
Last edited Oct 31, 2020
Created on Oct 30, 2020

This example displays a horizontal bar chart ranking country populations, drawing data from a CSV file that lists countries alongside their population figures. The chart visualizes the relative population sizes of nations like China, India, and the United States using black bars on an SVG canvas. The React-based code uses D3 version 6 methods including `scaleLinear` for the population axis, `scaleBand` for the categorical country axis, `axisLeft` and `axisBottom` for the chart’s axes, and `csv` to load the data, with all population values multiplied by 1000 for display.

AI-generated description

React Starter code.

Comments

Sign in to join the discussion.

MIT Licensed