Fork of Activity 6_Task 1.2
✓ Published0🌍 Public
This example shows a horizontal bar chart comparing the population of 20 countries in 2010, with a green bar for each country and a blue axis. The React app loads data from a CSV file via D3’s `csv` function, then uses `scaleBand` and `scaleLinear` to map the country names and population values to SVG rectangles. Axis labels are formatted with D3’s `format` function to abbreviate numbers like “1.2B”. The visualization renders entirely as SVG elements, with axis ticks and marks defined in separate ES6 modules.
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