Activity 7
✓ Published0🌍 Public
This example shows a horizontal bar chart of population data for 20 countries in 2020, sourced from a CSV file. The chart uses React with D3 v5, employing `scaleBand` and `scaleLinear` for scales and rendering bars as SVG rectangles. The code loads data via `useData`, formats tick labels with `format('.2s')`, and includes axis components with blue tick lines and green bars, with a title tooltip on each rectangle.
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