🌍 Public
Task 1
This chart displays the population of 30 countries in 2020, sorted along the y-axis with a horizontal bar for each country whose length corresponds to its population. Built with React and D3 v5, the visualization uses `scaleBand` for the categorical country axis and `scaleLinear` for the continuous population axis, rendering SVG rectangles for the bars. The data is fetched via D3’s `csv` function, and tick labels on the x-axis are formatted using `d3.format`. Blue axis lines and green bars are styled through CSS, with tooltips showing each value on hover.
AI-generated descriptionA demonstration of how to start using D3 version 6.
MIT Licensed
Comments
Sign in to join the discussion.