Fork of CV: Bar Chart
✓ Published0🌍 Public
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 descriptionMIT Licensed