Activity6_task1
✓ Published1🌍 Public
This example displays a horizontal bar chart comparing the 2020 populations of 30 countries, using D3 v5 and React to render the visualization as an SVG. The code imports `scaleBand`, `scaleLinear`, `format`, and `csv` from D3 to process the remote CSV data and map each country to a proportional green bar. Custom `AxisBottom`, `AxisLeft`, and `Marks` components generate the axes and rectangles, with tooltips showing formatted population values. The chart includes blue tick lines and labels for the “POPULATION-2020” axis.
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