Activity6_TaskQ2
✓ Published0🌍 Public
A bar chart displays the top 30 countries by population in 2010, using a horizontal layout with countries on the y-axis and population values on the x-axis. The chart renders as SVG within a React application, using D3’s `scaleBand` and `scaleLinear` to position bars and axes. Population values are parsed from a CSV file and formatted with D3’s `format` function, converting values from millions to billions with a custom tick label. The visualization includes styled axes, a chart title, and tooltips that show the precise population value for each bar when hovered.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed