🌍 Public
Activity_6_Q1.2
This example renders a horizontal bar chart of the top 20 countries by 2010 population, with each bar’s length proportional to population and a tooltip showing the formatted value. Built with React and D3 v5, it uses `d3.scaleBand` for the y-axis categories, `d3.scaleLinear` for the x-axis, and SVG `rect` elements for bars. Data is loaded via `d3.csv` from a remote URL, with axes generated by custom `AxisBottom` and `AxisLeft` components.
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
Comments
Sign in to join the discussion.