Skip to main content
100%

Fork of CV: Bar Chart

✓ Published0🌍 Public
Cchenyuguo851@gmail.com
Last edited Aug 11, 2026
Created on Aug 11, 2026
Forked from CV: Bar Chart

This interactive bar chart displays the population of ten countries using SVG rectangles rendered through a React component. The visualization uses d3.scaleBand and d3.scaleLinear to map country names and population values to x and y positions, with d3.axisBottom and d3.axisLeft generating the axes. Population data loads from a CSV file via d3.csv, and clicking a bar highlights it with a white fill and black stroke. The chart updates dynamically through a ResizeObserver that tracks container dimensions, while d3 joins manage bar and axis rendering.

AI-generated description
MIT Licensed

Similar vizzes