QUESTION-1.2(TASK-1)
✓ Published0🌍 Public
This example displays a horizontal bar chart of the top 20 countries by 2010 population, with bars sorted in descending order and labeled on the y-axis. The visualization uses React with D3 v5 scaleBand and scaleLinear for positioning, while CSV data is fetched from a GitHub raw URL. SVG rendering is handled through React components (AxisBottom, AxisLeft, Marks), with axis ticks styled via CSS and formatted using D3’s format('.2s') to abbreviate values in billions.
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