Activity6_Ques1(2)
✓ Published0🌍 Public
This example displays a horizontal bar chart of population data for 20 countries in the year 2000, using blue rectangular marks with a blue axis line and gray tick labels. The React app loads CSV data from a GitHub repository via the `csv` function from d3.v5, processes the population column by multiplying by 1000, and renders the visualization as SVG. It employs `scaleBand` for the categorical country axis, `scaleLinear` for the numeric population axis, and custom React components—`AxisBottom`, `AxisLeft`, and `Marks`—to generate the ticks and bars, with a tooltip showing formatted values on hover.
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