CV: Bar Chart
• Draft1🔗 Unlisted
This example shows a horizontal bar chart of the top 20 most populous countries in 2024, using data loaded from a CSV file with d3.csv. The chart is built with React and D3 v7, rendering SVG bars whose fill color changes from teal to red when clicked, with axes and labels drawn using d3.axisBottom and d3.axisLeft. The visualization updates responsively to the container size via a ResizeObserver and an SVG data join.
AI-generated descriptionMIT Licensed