🌍 Public
Act-7_Q1_1
A horizontal bar chart displays the 2020 population estimates for thirty countries, sorted by country name with population values encoded as bar lengths. The visualization uses React with D3 v5’s `scaleBand` and `scaleLinear` to map data, rendering SVG rectangles via the `Marks` component. Axes are generated with custom `AxisBottom` and `AxisLeft` components, using `d3.format` to abbreviate tick labels (e.g., converting billions to ‘B’). Data is loaded asynchronously from a remote CSV file using D3’s `csv` method, with native SVG `<title>` elements providing hover tooltips.
AI-generated descriptionA demonstration of how to start using D3 version 6.
MIT Licensed
Comments
Sign in to join the discussion.