Activity 6_Task1
✓ Published0🌍 Public
This example presents a horizontal bar chart comparing the populations of various countries in 2020, sourced from a CSV file. Rendered as an SVG within React, it uses D3.js modules to manage data processing and scales: `scaleBand` positions the country names on the y-axis, while `scaleLinear` maps population values to the x-axis. Custom ES6 modules (`AxisBottom`, `AxisLeft`, `Marks`) draw the ticks, labels, and bars, with a "POPULATION-2020" footer label. The code imports D3 from UNPKG, demonstrating modular integration.
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