question1.2
✓ Published0🌍 Public
This example displays a horizontal bar chart of population data for 20 countries in 2010. The visualization uses React with D3 v5 scale functions, specifically `scaleBand` for the categorical y-axis and `scaleLinear` for the numeric x-axis. The bars are rendered as SVG rectangles, with axes created through custom components that map D3 scales to JSX elements. The chart loads CSV data from a GitHub gist, formats population values using the D3 `format` function, and includes a tooltip showing the formatted value for each bar.
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