Activity-6 Task_1 poorna
✓ Published0🌍 Public
This example displays a horizontal bar chart ranking the populations of 30 countries for the year 2020. The visualization uses React with D3 version 5 to render SVG elements, employing a linear scale for the population axis and a band scale for the categorical country axis. Data is loaded from a remote CSV file using d3.csv, with population values converted from thousands. The bars are colored green, and hovering reveals the population value in a tooltip. Axis ticks and labels are generated programmatically, with bottom axis values formatted using d3's format function to abbreviate large numbers (e.g., converting G to B).
AI-generated descriptionA demonstration of how to start using D3 version 6.
MIT Licensed