Activity7Task1
✓ Published0🌍 Public
This example shows a horizontal bar chart ranking 20 countries by their 2020 population, with each bar’s length encoded by a linear scale and a green fill. The visualization uses React to render SVG components, with D3 v5 providing the scaleBand, scaleLinear, and format utilities for axes and tick labels. Data is loaded via d3.csv from a Gist URL, and axes are built with custom React components (AxisBottom, AxisLeft) that generate tick lines and text. Hovering reveals a tooltip with the formatted population value.
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