Skip to main content
100%

Activity_6

✓ Published0🌍 Public
HHarinathChakali33@gmail.com
Last edited Apr 9, 2024
Created on Apr 9, 2024
Forked from Hello VizHub

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 description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes