Skip to main content
100%

Activity_6_Question-1.2

✓ Published0🌍 Public
Ttarun.chintada46@gmail.com
Last edited Oct 22, 2024
Created on Oct 22, 2024
Forked from Hello VizHub

A horizontal bar chart displays the 2010 populations of 20 countries, sourced from a CSV hosted in a GitHub repository. The chart uses React with D3 v5 modules, including `scaleBand` and `scaleLinear`, to map categorical country names and quantitative population values to SVG rectangles. Axis components are built from custom React modules, and D3’s `format` with the `.2s` notation (replacing 'G' with 'B') formats the x-axis tick labels as billions. Tooltips show the exact formatted population value via SVG `<title>` elements.

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