Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bar Charts

Public visualization

Viewing a saved revision (read-only)

f92470a99eb5471d9bff19eb8fbd70d2

Bar Charts

0 stars0🌍 Public
CChiedu Egbumokei Jr
Last edited Dec 26, 2021
Created on Dec 26, 2021

This example shows a horizontal bar chart of country populations, with each country’s bar length proportional to its 2020 population value. Built with React and D3 v5, it loads CSV data via `d3.csv`, maps the population field, and renders SVG rectangles using `scaleBand` for the categorical y-axis and `scaleLinear` for the quantitative x-axis. The bars are positioned and sized based on the scales, with the chart updating once the asynchronous data fetch completes.

AI-generated description

A program that follows your mouse with a circle.