Activity-6-Question-1.2
✓ Published0🌍 Public
This example displays a horizontal bar chart comparing the populations of 20 countries in 2010, rendered as SVG within a React application. The chart uses D3 scale functions, `scaleBand` for the y-axis and `scaleLinear` for the x-axis, with population values read from a CSV file. Axes are custom components that render ticks and labels, while bars include native SVG tooltips showing formatted population values. The code loads data via `d3.csv` and formats tick labels using `d3.format`.
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