Activity_6
✓ Published0🌍 Public
This example presents a horizontal bar chart visualizing the 2020 population of various countries. The chart uses a diverging bar layout, with countries listed on the y-axis and population values on the x-axis, rendered as an SVG within a React component. It leverages D3 v5 modules including `scaleBand`, `scaleLinear`, `max`, and `format` to compute scales and format axis tick labels with a 'B' suffix for billions. The data is loaded asynchronously via a custom `useData` hook, and the visualization includes labeled axes with a "POPULATION-2020" title.
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