Activity 6_Task 1
✓ Published1🌍 Public
This example presents a horizontal bar chart of 2020 population data by country, using D3 v5 within a React framework. The visualization encodes population values on a linear x-scale and country names on a categorical y-axis, with tick labels formatted to abbreviate billions. SVG rendering is used, and the chart is built with D3’s `scaleBand` and `scaleLinear` functions, alongside custom `AxisBottom`, `AxisLeft`, and `Marks` components. The code imports data via a custom `useData` hook and D3’s `csv` parser, with axis styling defined in the HTML file.
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