activity 6 task1 tutorial 1
✓ Published0🌍 Public
This example shows a horizontal bar chart of 2020 population data by country, with bars colored light green and blue axis lines. The visualization uses React to render an SVG scene, loading data through a custom `useData` hook and building scales with `d3.scaleBand` and `d3.scaleLinear`. Axis components are modularized, and the x-axis labels use D3's `format('.2s')` to abbreviate population values, replacing 'G' with 'B'. The chart is constructed entirely with D3 v5 and React, demonstrating ES6 module imports and component-based structure.
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