Skip to main content
100%

Bar Charts

✓ Published0🌍 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.

MIT Licensed

Similar vizzes