Skip to main content
100%

Fork of CV: Bar Chart

✓ Published0🌍 Public
445.saiful@gmail.com
Last edited Mar 9, 2026
Created on Mar 9, 2026
Forked from CV: Bar Chart

This example shows a bar chart of the 30 most populous cities worldwide using React and D3 v7, with population values displayed in millions on the y-axis and city names on the rotated x-axis. The chart renders as SVG and supports interactive selection—clicking a bar highlights it in red. Data loads from a raw GitHub Gist URL and is parsed manually into an array of city-population objects. The visualization builds scales with `d3.scaleBand` and `d3.scaleLinear`, renders axes via `d3.axisBottom` and `d3.axisLeft`, and uses React hooks for container dimensions and state management.

AI-generated description
MIT Licensed

Similar vizzes